Page 1 of 1

OTA partition

Posted: Thu Nov 18, 2021 12:54 pm
by mm_1993
Hi everyone
can I make something like this ?

# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x009000, 0x004000
otadata, data, ota, 0x00d000, 0x002000
phy_init, data, phy, 0x00f000, 0x001000
factory, app, factory, 0x010000, 0x180000
ota_0, app, ota_0, , 0x180000

soo what is this partition table problem ?
I use 4Mb flash and my program bin size is 1.5 Mb and i need OTA too
one way is I use a 8Mb flash but if I dont want to do that can I delete ota_1 from partition csv table ?

thank you

Re: OTA partition

Posted: Thu Nov 18, 2021 1:16 pm
by chegewara
To have OTA capability you need at least 2 ota partitions, but you dont actually need factory partition.
There is option to use factory + 1 x OTA partition, but it requires from you to switch to perform OTA update always from factory partition/app, so before OTA start you have to switch running partition.

Re: OTA partition

Posted: Thu Nov 18, 2021 1:26 pm
by mm_1993
chegewara wrote:
Thu Nov 18, 2021 1:16 pm
To have OTA capability you need at least 2 ota partitions, but you dont actually need factory partition.
There is option to use factory + 1 x OTA partition, but it requires from you to switch to perform OTA update always from factory partition/app, so before OTA start you have to switch running partition.
thank you man
I change my partition table to :

# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x009000, 0x004000
otadata, data, ota, 0x00d000, 0x002000
phy_init, data, phy, 0x00f000, 0x001000
ota_0, app, ota_0, , 0x180000
ota_1, app, ota_1, , 0x180000

and it's work :)))

so what's factory app ? there's any link for more info ?

Re: OTA partition

Posted: Thu Nov 18, 2021 1:32 pm
by chegewara
Probably there is info about factory app, but i dont know link.
There is few options you can use factory app (not complete list):
1. fallback app, when OTA partitions fail for some reason
2. like i described above, minimal app that is used only to perform firmware update
3. you can have few OTA partitions, each with completely different firmware and factory would be used to select which app to start
4. you can imagine more options here

Re: OTA partition

Posted: Thu Nov 18, 2021 1:43 pm
by mm_1993
chegewara wrote:
Thu Nov 18, 2021 1:32 pm
Probably there is info about factory app, but i dont know link.
There is few options you can use factory app (not complete list):
1. fallback app, when OTA partitions fail for some reason
2. like i described above, minimal app that is used only to perform firmware update
3. you can have few OTA partitions, each with completely different firmware and factory would be used to select which app to start
4. you can imagine more options here
Thank you very much for the information you shared with me.
best regards