I want to reserve some flash area to store application specific configuration data. This data will not change for the life of the product. I originally had an area set aside in the dts file, like so.
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x0 0x10000>;
};
slot0_partition: partition@10000 {
label = "image-0";
reg = <0x10000 0xE5000>;
};
app_partition: partition@F5000 {
label = "app-data";
reg = <0x000F5000 0x00003000>;
};
storage_partition: partition@f8000 {
label = "storage";
reg = <0xf8000 0x8000>;
};
};
};
That caused a problem when I added MCUBOOT as the bootloader, because MCUBOOT would erase the "app-partition" section.
When the project has a child image, as it does when MCUBOOT is enabled, the flash partitions in the DTS will be ignored. The partitions from the Partition Manager will be used instead.
I added this to overlay-dfu_support.conf to preserve the settings storage partition:
CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x8000
CONFIG_SETTINGS_NVS_SECTOR_COUNT=8
That fixed the settings storage, but still erased the app-data partition, so I changed to this:
CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0xB000
CONFIG_SETTINGS_NVS_SECTOR_COUNT=11
Now, the problem is that there is no partition for app-data, just settings storage, so after a while the settings erase the app-data.
How do I add a partition for application specific data using partition manager?
Mary