CONFIG_APP_MSC_STORAGE_RAM VS FLASH_FATFS

Hi Team,
NCS v2.3.0
nrf52840

my project works as expected with CONFIG_APP_MSC_STORAGE_RAM=y

but I need storage FLASH_FATFS

I set CONFIG_APP_MSC_STORAGE_FLASH_FATFS=y
and the disk does not open in Windows, it gives an error window when connecting nrf USB.

Thank you.

4034.chatDK_update.7z
Parents Reply Children
  • In version with FOTA and CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y

    when I add to prj.conf your changes

    when I set CONFIG_NVS=n I have error

    C:\ncs\v2.3.0\nrf\include\flash_map_pm.h:41:22: error: 'PM_storage_partition_ID' undeclared (first use in this function)
       41 | #define PM_ID(label) PM_##label##_ID
          |                      ^~~
    C:\ncs\v2.3.0\nrf\include\flash_map_pm.h:46:35: note: in expansion of macro 'PM_ID'
       46 | #define FIXED_PARTITION_ID(label) PM_ID(label)
          |                                   ^~~~~
    c:\da\ncs\chat\src\mass.c:23:41: note: in expansion of macro 'FIXED_PARTITION_ID'
       23 | #define STORAGE_PARTITION_ID            FIXED_PARTITION_ID(STORAGE_PARTITION)
          |                                         ^~~~~~~~~~~~~~~~~~
    c:\da\ncs\chat\src\mass.c:34:36: note: in expansion of macro 'STORAGE_PARTITION_ID'
       34 |         mnt->storage_dev = (void *)STORAGE_PARTITION_ID;
          |                                    ^~~~~~~~~~~~~~~~~~~~
    C:\ncs\v2.3.0\nrf\include\flash_map_pm.h:41:22: note: each undeclared identifier is reported only once for each function it appears in
       41 | #define PM_ID(label) PM_##label##_ID
          |                      ^~~
    C:\ncs\v2.3.0\nrf\include\flash_map_pm.h:46:35: note: in expansion of macro 'PM_ID'
       46 | #define FIXED_PARTITION_ID(label) PM_ID(label)
          |                                   ^~~~~
    c:\da\ncs\chat\src\mass.c:23:41: note: in expansion of macro 'FIXED_PARTITION_ID'
       23 | #define STORAGE_PARTITION_ID            FIXED_PARTITION_ID(STORAGE_PARTITION)
          |                                         ^~~~~~~~~~~~~~~~~~
    c:\da\ncs\chat\src\mass.c:34:36: note: in expansion of macro 'STORAGE_PARTITION_ID'
       34 |         mnt->storage_dev = (void *)STORAGE_PARTITION_ID;

  • Hi,

    There might be a problem with coexistence of storage partition with external flash partition. It would be useful if I could reproduce this issue. Could you make a minimal sample which I could use for this purpose?

    Best regards,
    Dejan

  • Hi,

    I have tested your sample and found 2 pairs of conflicting lines in your prj.conf. 

    CONFIG_NVS=y
    and
    CONFIG_NVS=n
    as well as 
    CONFIG_PM_SINGLE_IMAGE=y
    and
    CONFIG_PM_SINGLE_IMAGE=n



    You should have assigned the value for each configuration option once.

    CONFIG_NVS=n
    CONFIG_PM_SINGLE_IMAGE=n


    Best regards,
    Dejan

Related