Custom OTA; with one OTA partition

Stipa88
Posts: 20
Joined: Mon May 09, 2022 12:26 pm

Custom OTA; with one OTA partition

Postby Stipa88 » Thu Aug 08, 2024 7:58 pm

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

a2800276
Posts: 78
Joined: Sat Jan 23, 2016 1:59 pm

Re: Custom OTA; with one OTA partition

Postby a2800276 » Thu Aug 08, 2024 9:53 pm

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.

Who is online

Users browsing this forum: Bing [Bot] and 296 guests