ARMmbed / qspif-blockdevice

DEPRECATED: This repository is deprecated, please use mbed-os-example-blockdevice
5 stars 2 forks source link

not able to build qspif- blockdevice #21

Closed nagarathna321 closed 4 years ago

nagarathna321 commented 5 years ago

Hi , I am new to mbed tool ,I have started working on nor flash with the psoc 6 when I am trying to compile the code i am getting error as bellow shown

[Error] QSPIFBlockDevice.h@229,5: 'qspi_status_t' does not name a type; did you mean 'nsapi_stack_t'? [Error] QSPIFBlockDevice.h@233,5: 'qspi_status_t' does not name a type; did you mean 'nsapi_stack_t'? [Error] QSPIFBlockDevice.h@236,5: 'qspi_status_t' does not name a type; did you mean 'nsapi_stack_t'? [Error] QSPIFBlockDevice.h@239,5: 'qspi_status_t' does not name a type; did you mean 'nsapi_stack_t'? [Error] QSPIFBlockDevice.h@243,5: 'qspi_status_t' does not name a type; did you mean 'nsapi_stack_t'? [Error] QSPIFBlockDevice.h@248,5: 'qspi_status_t' does not name a type; did you mean 'nsapi_stack_t'? [Error] QSPIFBlockDevice.h@310,11: 'QSPI' in namespace 'mbed' does not name a type

I have added all related eader file sitll i am not getting please help me out .

thanks

ciarmcom commented 5 years ago

ARM Internal Ref: IOTSTOR-886

michalpasztamobica commented 5 years ago

Hi, @nagarathna321 . QSPIF lives under the components directory in mbed-os, os you might need to add the following line to your mbed_app.json, to get it working:

{
    "target_overrides": {
        "*": {
            "target.components_add": ["QSPIF"],
        }
    }
}

Have you tried this already? If you did and you still have issues, the please, paste the exact command you are using to build the code and the contents of your mbed-app.json.

michalpasztamobica commented 5 years ago

It seems that the problem is related to environment configuration, but we have no response from the reporter. I suggest we close the issue.

rblaze commented 4 years ago

Hello,

I run into the same issue. Here is relevant information:

blaze@andrey-XPS:~/dev/mbed/flash_writer$ mbed target
[mbed] Working path "/home/blaze/dev/mbed/flash_writer" (program)
[mbed] NUCLEO_F446ZE
blaze@andrey-XPS:~/dev/mbed/flash_writer$ mbed toolchain
[mbed] Working path "/home/blaze/dev/mbed/flash_writer" (program)
[mbed] GCC_ARM
blaze@andrey-XPS:~/dev/mbed/flash_writer$ cat mbed_app.json 
{
    "target_overrides": {
        "*": {
            "target.components_add": ["QSPIF"]
        },
        "K64F": {
            "platform.stdio-baud-rate": 9600
        }
    }
}
blaze@andrey-XPS:~/dev/mbed/flash_writer$ cat main.cpp 
#include "mbed.h"
#include "QSPI.h"
//#include "QSPIFBlockDevice.h"

int main() {
//  QSPIFBlockDevice sdd(PD_11, PD_12, PE_2, PD_13, PB_2, PB_6);

  for (;;) {
  }
}

When I'm running mbed compile, I'm getting multiple errors:

blaze@andrey-XPS:~/dev/mbed/flash_writer$ mbed compile
[mbed] Working path "/home/blaze/dev/mbed/flash_writer" (program)
[Warning] @,: Compiler version mismatch: Have 8.3.1; expected version >= 6.0.0 and < 7.0.0
Building project flash_writer (NUCLEO_F446ZE, GCC_ARM)
Scan: flash_writer
Compile [  6.0%]: USBCDC.cpp
Compile [  6.1%]: USBCDC_ECM.cpp
[...]
Compile [ 12.3%]: QSPIFBlockDevice.cpp
[Error] QSPIFBlockDevice.h@238,5: 'qspi_status_t' does not name a type
[Error] QSPIFBlockDevice.h@242,5: 'qspi_status_t' does not name a type
[Error] QSPIFBlockDevice.h@245,5: 'qspi_status_t' does not name a type
[Error] QSPIFBlockDevice.h@248,5: 'qspi_status_t' does not name a type
[Error] QSPIFBlockDevice.h@252,5: 'qspi_status_t' does not name a type
[Error] QSPIFBlockDevice.h@255,5: 'qspi_status_t' does not name a type
[Error] QSPIFBlockDevice.h@258,5: 'qspi_status_t' does not name a type
[Error] QSPIFBlockDevice.h@261,5: 'qspi_status_t' does not name a type
[Error] QSPIFBlockDevice.h@264,5: 'qspi_status_t' does not name a type
[Error] QSPIFBlockDevice.h@336,11: 'QSPI' in namespace 'mbed' does not name a type
[Error] QSPIFBlockDevice.h@341,12: 'SingletonPtr' does not name a type
[Error] QSPIFBlockDevice.h@350,5: 'PlatformMutex' does not name a type
[Error] QSPIFBlockDevice.h@353,11: 'qspi_inst_t' in namespace 'mbed' does not name a type
[Error] QSPIFBlockDevice.h@354,11: 'qspi_inst_t' in namespace 'mbed' does not name a type
[Error] QSPIFBlockDevice.h@358,11: 'qspi_inst_t' in namespace 'mbed' does not name a type
[Error] QSPIFBlockDevice.h@359,11: 'qspi_inst_t' in namespace 'mbed' does not name a type
[Error] QSPIFBlockDevice.h@364,11: 'qspi_inst_t' in namespace 'mbed' does not name a type
[Error] QSPIFBlockDevice.h@367,11: 'qspi_inst_t' in namespace 'mbed' does not name a type
[Error] QSPIFBlockDevice.h@392,5: 'qspi_bus_width_t' does not name a type
[Error] QSPIFBlockDevice.h@393,5: 'qspi_bus_width_t' does not name a type

and many more similar lines.

michalpasztamobica commented 4 years ago

Hi @rblaze . Seems like the NUCLEO_F446ZE target is indeed missing the QSPI feature config. But even when this is added the pins for QSPIF are not set in PinNames.h

So, it seems this target is not yet supported in mbed-os, even though I can see it has QSPIF support. You may try to add it yourself, following how other devices has it, for example DISCO_F413ZH. If you succeed a PR to mbed-os would be very welcome 😃

@ARMmbed/mbed-os-storage , @SeppoTakalo do we need this repository, if QSPIF is in components in mbed-os? Should this repository be deprecated?

SeppoTakalo commented 4 years ago

This repository is deprecated as the QSPIF driver is already in Mbed OS.

0xc0170 commented 4 years ago

I'll close the issue as QSPIF driver should be used instead.

horeich commented 4 years ago

Same error here as @nagarathna321 as soon as I add QSPIFBlockDevice.h to my script.

same error when I add "target.components_add": ["QSPIF"] to target_overrides, as it then is included in kv_store.cpp which fails.

In my main I include #include "components/storage/blockdevice/COMPONENT_QSPIF/QSPIFBlockDevice.h"

#include <QSPIFBlockDevice.h> does not work.

0xc0170 commented 4 years ago

STM32L476RG

Do you have DEVICE_QSPI enabled and supported?