I am developing application using nRF Connect SDK (v2.5.2) on custom design based on nRF52840. The design is a prototype device and currently have dozens of them assembled and running the same application.
I have added support for OTA and initially, I have defined few partitions in static partition manager configuration file, pm_static.yml:
app:
address: 0x13200
region: flash_primary
size: 0x75e00
mcuboot:
address: 0x0
placement:
before:
- mcuboot_primary
region: flash_primary
size: 0x13000
mcuboot_pad:
address: 0x13000
placement:
align:
start: 0x1000
before:
- mcuboot_primary_app
region: flash_primary
size: 0x200
mcuboot_primary:
address: 0x13000
orig_span: &id001
- app
- mcuboot_pad
region: flash_primary
sharers: 0x1
size: 0x76000
span: *id001
mcuboot_primary_app:
address: 0x13200
orig_span: &id002
- app
region: flash_primary
size: 0x75e00
span: *id002
mcuboot_secondary:
address: 0x89000
placement:
after:
- mcuboot_primary
align:
start: 0x1000
align_next: 0x1000
region: flash_primary
share_size:
- mcuboot_primary
size: 0x76000
storage:
address: 0xff000
region: flash_primary
size: 0x1000
sram_primary:
address: 0x20000000
end_address: 0x20040000
region: sram_primary
size: 0x40000
With this version of the static partitions file, I haven't utilized the storage partition, until recently, when I discovered that I can't utilize it with NVS as it only has single sector.
Now, I understand that I need to adjust the static partition file to resolve the issues, but the dozens of the prototype devices are already flashed and it is good if I don't need to reflash them from scratch again, as adjusting the mcuboot primary and secondary partitions will require mcuboot to be updated, which currently is possible only with reflashing.
Can I have the storage partition overlap with the mcuboot secondary partition, if I ensure that the secondary slot will never reach the region where the storage partition will lie?
For example, can I define the storage partition like this?
storage: address: 0xfc000 region: flash_primary size: 0x4000
If this is possible, by doing this I won't need to reflash all of the devices, as mcuboot partitions layout won't change.
Thank you in advance.