I'm also looking for an OTA update. There is some progress there, but not yet documented.
So far I managed to create a OTA supporting partition table.
Create your own board spec in the boards folder inside ports/esp32.
Like "GENERIC_OTA" for example.
Copy the mpconfigboard.h and the mpconfigboard.mk from another board e.g. GENERIC or add them to you folder.
In the mpconfigboard.h you could change the BoardName.
In the mpconfigboard.mk you could add a reference to your partition.csv (You can find an example in the GENERIC_D2WD/mpconfigboard.mk
Mine is looking like this:
SDKCONFIG += boards/sdkconfig.base
PART_SRC = partitions-ota.csv
FLASH_SIZE = 4MB
FLASH_MODE = dio
FLASH_FREQ = 40m
My partitions-ota.csv file resides in the ports/esp32 folder and looks like this:
# Name, Type, SubType, Offset, Size, Flags
# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild
nvs, data, nvs, 0x9000, 0x4000,
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000,
Mini_0, app, ota_0, , 1536K
Mini_1, app, ota_1, , 1536K,
vfs, data, fat, , 768K
I build my firmware with some modules so i needed some more space than 1MB the missing offsets are getting filled by esp partition tool.
That's all I've got so far.
On the first boot the partition table gets created. With :
from esp32 import Partition
you can access the different partitions as objects.
More on this here:
I'm struggling at the moment on how to get another firmware to the Mini_1 partition via download or copy. I'm fairly new to MCUs and (Micro)Python...
Once you managed to get the data to the other partition you can select it with the use of the Partition class and call part.set_boot() to mark this as active partition for the next boot.
If you or somebody else knows how to get the data to the other partition, please let me know.