Hye everyone, thanks for the project
i have a problem on NRF52840 on a project using mcuboot (ota) and an external flash used independently by the app (not for ota)
prj.conf:
... CONFIG_BOOTLOADER_MCUBOOT=y CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y
myboard.dts:
... &zd25wq32 { partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; storagenor_part: partition@0 { label = "storagenor"; reg = <0x000000 0x400000>; /* 0x00100000 -> 4MB */ }; }; };
storage.c
... #define STORAGE_PARTITION storagenor_part #define STORAGE_PARTITION_ID FIXED_PARTITION_ID(STORAGE_PARTITION)
my code build when CONFIGBOOTLOADER_MCUBOOT=n
but i get a compilation error when CONFIG_BOOTLOADER_MCUBOOT=y
[15/363] Building C object CMakeFiles/app.dir/src/drivers/storage.c.obj FAILED: CMakeFiles/app.dir/src/drivers/storage.c.obj ... In file included from /opt/nordic/ncs/v2.5.2/zephyr/include/zephyr/storage/flash_map.h:275, from ../src/drivers/storage.c:19: ../src/drivers/storage.c: In function 'setup_flash': /opt/nordic/ncs/v2.5.2/nrf/include/flash_map_pm.h:43:22: error: 'PM_storagenor_part_ID' undeclared (first use in this function) 43 | #define PM_ID(label) PM##label##_ID | ^ /opt/nordic/ncs/v2.5.2/nrf/include/flash_map_pm.h:48:35: note: in expansion of macro 'PM_ID' 48 | #define FIXED_PARTITION_ID(label) PM_ID(label) | ^ ../src/drivers/storage.c:12:41: note: in expansion of macro 'FIXED_PARTITION_ID' 12 | #define STORAGE_PARTITION_ID FIXED_PARTITION_ID(STORAGE_PARTITION) | ^~~~ ../src/drivers/storage.c:36:36: note: in expansion of macro 'STORAGE_PARTITION_ID' 36 | mnt->storage_dev = (void *)STORAGE_PARTITION_ID; | ^~~~~~~~
tried a lot but i can't pass through this
same pb with toolchain 2.4.2 and 2.5.2.
any advice ?!