Page 1 of 1

Custom OTA; with one OTA partition

Posted: Thu Aug 08, 2024 7:58 pm
by Stipa88
Hello everyone.

I use ESP32-C3-MINI, which has a max. 4MB of flash memory.
That memory is not enough for me to organize the partition table with two OTA partitions and use the classic OTA.

I wanted to organize flash memory in the following way:

Code: Select all

# ESP-IDF Partition Table
# Name,   Type, SubType, Offset,  Size, Flags
nvs,      data, nvs,     0x9000,  0x4000,
otadata,  data, ota,     0xd000,  0x2000,
phy_init, data, phy,     0xf000,  0x1000,
My_ota,   app,  factory, 0x10000, 0x180000,
app,      app,  ota_0,   0x190000,0x270000,
The "My_ota" partition is the code that has WiFi, OTA.. and can flash the "app" partition.
After flashing, the "app" partition is executed.

After booting/turning on the device, "My_ota" starts, which decides whether to flash the "app" partition, and then jumps to executing the "app" partition.

Is such an implementation possible, and is there any example with such an implementation.
Does the current bootloader support such a mode?

Thank you

Re: Custom OTA; with one OTA partition

Posted: Thu Aug 08, 2024 9:53 pm
by a2800276
In this scenario, I would skip the factory partition and use two OTA partitions. I believe it just works(tm) if you change the factory partition to OTA.

You no longer have the ability to fall back to a factory state, but that seems less important than being able to recover from an interrupted firmware update.