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: