Hello,
I have dts files defined with flash partitions which build & work fine on nCS v2.6.0
But the moment i add same definitions to dts of nCS v2.9.0 it gives me redefinition error:
-- Found BOARD.dts: /opt/nordic/ncs/v2.9.0/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.dts devicetree error: Label 'boot_partition' appears on /soc/flash-controller@4001e000/flash@0/partitions/partition@0 and on /soc/flash-controller@4001e000/flash@0/partitions/partition@f8000 CMake Error at /opt/nordic/ncs/v2.9.0/zephyr/cmake/modules/dts.cmake:295 (execute_process): execute_process failed command indexes:
If i try to define flash partitions in dts it says:
You are using Partition Manager to define the partitions. Devicetree definitions are ignored for this build.
If i define in pm_static file as :
nvs_storage: address: 0xD7000 end_address: 0xf7000 placement: align: start: 0x1000 before: - device_info region: flash_primary size: 0x20000
& try to fetch it anyways in code as:
// #define NVS_PARTITION_OFFSET PM_NVS_STORAGE_ADDRESS // #define NVS_PARTITION_SIZE PM_NVS_STORAGE_SIZE // #define NVS_PARTITION_DEVICE DEVICE_DT_GET(PM_NVS_STORAGE_DEV) // #define NVS_PARTITION_OFFSET_TEMP PM_DEVICE_INFO_ADDRESS // #define NVS_PARTITION_SIZE_TEMP PM_DEVICE_INFO_SIZE // #define NVS_PARTITION_DEVICE_TEMP DEVICE_DT_GET(PM_DEVICE_INFO_DEV) #define NVS_PARTITION_OFFSET PM_NVS_STORAGE_ADDRESS #define NVS_PARTITION_SIZE PM_NVS_STORAGE_SIZE #define NVS_PARTITION_DEVICE DEVICE_DT_GET(DT_NODELABEL(flash0)) #define NVS_PARTITION_OFFSET_TEMP PM_DEVICE_INFO_ADDRESS #define NVS_PARTITION_SIZE_TEMP PM_DEVICE_INFO_SIZE #define NVS_PARTITION_DEVICE_TEMP DEVICE_DT_GET(DT_NODELABEL(flash0)) fs_temp.flash_device = NVS_PARTITION_DEVICE_TEMP; if (!device_is_ready(fs_temp.flash_device)) { printk("Flash device %s is not ready\n", fs.flash_device->name); return; } fs_temp.offset = NVS_PARTITION_OFFSET_TEMP;
I get errors as :
error: 'PM_NVS_STORAGE_ADDRESS' undeclared (first use in this function); did you mean 'PM_SETTINGS_STORAGE_ADDRESS'? 28 | #define NVS_PARTITION_OFFSET PM_NVS_STORAGE_ADDRESS error: 'PM_NVS_STORAGE_SIZE' undeclared (first use in this function); did you mean 'PM_SETTINGS_STORAGE_SIZE'? 29 | #define NVS_PARTITION_SIZE PM_NVS_STORAGE_SIZE error: 'PM_DEVICE_INFO_ADDRESS' undeclared (first use in this function) 32 | #define NVS_PARTITION_OFFSET_TEMP PM_DEVICE_INFO_ADDRESS | ^~~~~~~~~~~~~~~~~~~~~~