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
Dynamically changing the partition file.
-
- Posts: 9709
- Joined: Thu Nov 26, 2015 4:08 am
Re: Dynamically changing the partition file.
As far as I'm aware, everything running on the ESP32 proper should use the partition table to find where things live, not offsets. That should allow you to upload the same OTA package to devices with different partition layouts without issue. As you noticed, serial uploads to the bootloader are an exception, as they use absolute addresses.
Re: Dynamically changing the partition file.
For future users who find this: dynamically changing the partition table is doable.
I explain how we did it in this other topic: viewtopic.php?f=2&t=11482&p=48589#p48589
I explain how we did it in this other topic: viewtopic.php?f=2&t=11482&p=48589#p48589
Who is online
Users browsing this forum: Bing [Bot] and 91 guests