Partition table and OTA Updates in ESP32

Hello,

I'm a bit confused about the partition table and OTA Updates in ESP32.
The partition table has a space for the program, and a equal space where (I guess) it's downloaded the new firmaware and after this memory areas, another one for SPIFFS files.

I want to use a library that apparently downloads the binary to be updated to the SPIFFs instead of the space designed in the partition table. I also read some topics in forums that seem to do the same I.e here arduino c++ - how can my ESP32 be programmed with a .bin file on its SPIFFS - Stack Overflow

If I download the file to SPIFFS, does it mean that the space for the OTA update is not used?

At the moment I'm using a ESP32 with 4MB and my program requieres 1.7 MB. This means than if I download the firmaware to SPIFFS, I need at least 3.4 MB for program + SPIFFS and there is almost no space for the OTA memory space.

Will it work if I make a custom partition table with that memory sizes?
Instead of this partition table:
Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x140000,
app1, app, ota_1, 0x150000,0x140000,
spiffs, data, spiffs, 0x290000,0x170000,

Something like:
Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x1C0000,
spiffs, data, spiffs, 0x290000,0x1C0000,

Thanks

Just found this thread. The answer to my question seems to be NO.

https://forum.arduino.cc/t/firmware-update-via-spiffs/1202656/3

Yes.

Which library and why do you want to use it instead of the normal OTA ?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.