Page 1 of 1

OTA and SPIFF partitions

Posted: Mon Feb 06, 2023 4:32 am
by chamroeun
Hi,
My sketch is 995KB. My board is 4MB flash. I need to do OTA. and save as much space as possible for SPIFF for storing log data.
I would like to have 1.5MB or more for SPIFFs. I don't need rollback support

I go through severals post on this but with no clear solutions for my case. Some said two OTA with small Factory partition, while other said I can use a single OTA partitions, and another don't need to use Factory partition.
I use the following csv, it works. but it has only 500k for data.

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, 1M,
ota_0,    app,  ota_0,   ,        1M,
ota_1,    app,  ota_1,   ,        1M,
storage,  data, spiffs,  ,        500K,
Thanks;

Re: OTA and SPIFF partitions

Posted: Wed Feb 08, 2023 3:27 am
by tpbedford
You can simply delete the "factory" partition. You forego the option for a factory reset, but a failed OTA update still has rollback (by simply continuing to execute the last valid partition of the two OTA_n partitions)

As far as I understand, you must have two partitions: one to execute from, and one to download into. OTA_0 and OTA_1 together satisfy this without requiring the third factory partition.