factory partition + OTA +filesystem

frankiPL
Posts: 9
Joined: Thu Nov 16, 2017 8:59 am

factory partition + OTA +filesystem

Postby frankiPL » Fri Sep 14, 2018 1:12 pm

Hi
We have ESP32-WROOM-32-U with 4MB flash memory.
Our current program takes about 700kb (.bin file)
Is it possible to have factory partition + ota + storage with 500kb-1M ?
We hqave used OTA before in different project, but now we also need some storage for camera pictures.
Can it be done with 4MB ?
EG. how to modify this example?
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, , 0x4000,
otadata, data, ota, , 0x2000,
phy_init, data, phy, , 0x1000,
factory, app, factory, , 1M,
ota_0, app, ota_0, , 1M,
ota_1, app, ota_1, , 1M,

Best,
Marek

chegewara
Posts: 2230
Joined: Wed Jun 14, 2017 9:00 pm

Re: factory partition + OTA +filesystem

Postby chegewara » Fri Sep 14, 2018 6:54 pm

You can add spiffs partition as a storage. I think its best to start from here:
https://docs.espressif.com/projects/esp ... index.html

On this forum also is few topics about spiffs and storage static files. Here is one of them:
https://esp32.com/viewtopic.php?f=2&t=676&p=6484#p6484

Pozdrawiam

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: factory partition + OTA +filesystem

Postby fly135 » Fri Sep 14, 2018 7:02 pm

I'm wondering.... can the partition table be changed as follows. So that you can flash an OTA as if it were factory and then switch back and forth on OTA updates? Such that ota_0 acts like the factory but also works with OTA?

Code: Select all

nvs, data, nvs, , 0x4000,
otadata, data, ota, , 0x2000,
phy_init, data, phy, , 0x1000,
ota_0, app, ota_0, 0x10000, 1M,
ota_1, app, ota_1, , 1M,
storage,  data, spiffs,,1M,

davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

Re: factory partition + OTA +filesystem

Postby davdav » Sat Sep 15, 2018 10:12 am

Yes @fly135 you can do that..we started with that solution but for space limitation we turned out to have a small factory which does ota operation and an ota partition where program is executed in "normal" operation.

Who is online

Users browsing this forum: Baidu [Spider] and 139 guests