Using OTA with multi-partition application
Posted: Thu Sep 22, 2022 4:17 pm
I have an application that's pretty straightforward, but uses two partitions: one for the factory app, and SPIFFS partition for web pages and javascript, etc, which is the embedded web app used to access and configure, etc. More specifically:
I want to add OTA capability, but I'm unsure as to how to handle the www partition. I need two partitions for each "instance" of the application, but the OTA examples seem to only use one partition per application instance (ota_1, ota_2, etc...).
So I reckon it needs maybe to look something like this, although I suppose this isn't really correct for what I'm trying to achieve (e.g., how do I do OTA for the www partitions?):
How is OTA done when each instance of the app is multiple partitions? Seems like this would be a common scenario, so I'm sure I'm just missing something obvious in the docs or examples that I've overlooked. So maybe I just need to be pointed at the right thing.
Code: Select all
# Name Type SubType Offset Size
nvs data nvs 0x9000 0x6000
phy_init data phy 0xf000 0x1000
factory app factory 0x10000 0x130000
www data spiffs 0x140000 0x20000
So I reckon it needs maybe to look something like this, although I suppose this isn't really correct for what I'm trying to achieve (e.g., how do I do OTA for the www partitions?):
Code: Select all
# Name Type SubType Offset Size
nvs data nvs 0x9000 0x4000
otadata data ota 0xd000 0x2000
phy_init data phy 0xf000 0x1000
factory app factory 0x10000 0x130000
www data spiffs 0x140000 0x20000
ota_0 app factory 0x160000 0x130000
www_0 data spiffs 0x290000 0x20000
ota_1 app factory 0x2B0000 0x130000
www_1 data spiffs 0x3E0000 0x20000