Dynamically changing the partition file.
Posted: Thu Apr 18, 2019 5:55 pm
I'm would like to build multiple versions of my app to retain backwards compatibility with devices that must use OTA. I need to change the partition layout going forward, but want to keep the old one for OTA updates. I'm thinking that just building a different version to be OTA'd might be ok, since you can't change the partitions with OTA anyway. But I'm not sure that the code won't have something depends on partition layout.
Basically I'm splitting a partition I used for a file system into two paritions of FS and a second NVS.
So this....
storage, data, spiffs, 0x210000, 0xF0000,
later becomes this....
storage, data, spiffs, 0x210000, 0x80000,
secstore, data, nvs, 0x290000, 0x70000,
Can I use an environment variable or compiler define to switch between two partition definition files? Or can I just ignore the difference when I'm not flashing over USB? I.E. use bin file for OTA only.
John A
Basically I'm splitting a partition I used for a file system into two paritions of FS and a second NVS.
So this....
storage, data, spiffs, 0x210000, 0xF0000,
later becomes this....
storage, data, spiffs, 0x210000, 0x80000,
secstore, data, nvs, 0x290000, 0x70000,
Can I use an environment variable or compiler define to switch between two partition definition files? Or can I just ignore the difference when I'm not flashing over USB? I.E. use bin file for OTA only.
John A