What is the purpose of two OTA partition?
Re: What is the purpose of two OTA partition?
ok, It was exceed more than 4MB
Now I reduce it under 4MB
# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x9000, 0x4000
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
ota_0, app, ota_0, 0x10000, 0x145000
ota_1, app, ota_1, , 0x145000
storage, data, fat, ,0x100000
Still no output. not working.
Now I reduce it under 4MB
# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x9000, 0x4000
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
ota_0, app, ota_0, 0x10000, 0x145000
ota_1, app, ota_1, , 0x145000
storage, data, fat, ,0x100000
Still no output. not working.
Re: What is the purpose of two OTA partition?
If i may suggest something. Try to fix it in few steps:
to
step 2: change to (im assuming you still want to maximize ota partitions and have 512kB storage, other way skip it)
step 3: if above app with steps works add above storage partition
PS one more thing is worth to mention. when you are working with ota partitions each time you make flash thru usb its recommended to perform make erase_flash first
step 1: changeThis works
# 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, 0x1f0000
storage, data, fat, ,1M
Code: Select all
factory, app, factory, 0x10000, 0x1f0000
Code: Select all
ota, app, ota_1, 0x10000, 0x1A0000
Code: Select all
storage, data, fat, ,1M
Code: Select all
storage, data, fat, ,0x80000
step 3: if above app with steps works add above storage partition
Code: Select all
ota, app, ota_2, 0x10000, 0x1A0000
Re: What is the purpose of two OTA partition?
ok, I will try step by step as you suggested.
I always do make erase_flash first
I always do make erase_flash first
Re: What is the purpose of two OTA partition?
I tried out step #1 with storage. It stops working.
# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x9000, 0x4000
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
ota, app, ota_1, 0x10000, 0x1A0000
storage, data, fat, ,1M
# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x9000, 0x4000
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
ota, app, ota_1, 0x10000, 0x1A0000
storage, data, fat, ,1M
Re: What is the purpose of two OTA partition?
Sorry my mistake step #1 is working. wrong ota partition name. Now I will try adding second ota partition and check.
# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x9000, 0x4000
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
ota_0, app, ota_0, 0x10000, 0x1A0000
storage, data, fat, ,1M
# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x9000, 0x4000
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
ota_0, app, ota_0, 0x10000, 0x1A0000
storage, data, fat, ,1M
Re: What is the purpose of two OTA partition?
All working now. Thanks for yours input.
# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x9000, 0x4000
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
ota_0, app, ota_0, 0x10000, 0x1A0000
ota_1, app, ota_1, , 0x1A0000
storage, data, fat, ,0x80000
I have sector size=512 in my config. 4k sector is not good for 0.5 Mb storage.
# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x9000, 0x4000
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
ota_0, app, ota_0, 0x10000, 0x1A0000
ota_1, app, ota_1, , 0x1A0000
storage, data, fat, ,0x80000
I have sector size=512 in my config. 4k sector is not good for 0.5 Mb storage.
Re: What is the purpose of two OTA partition?
I have to appologize, it would take shorter to solve your issue if i have read more about storage partitions and sector size dependency.
PS now you can try to adjust partitions size to use all available flash
PS now you can try to adjust partitions size to use all available flash
Re: What is the purpose of two OTA partition?
Thanks for your input. Yes sector size is another input.
For now OTA size is big enough for me. I may increase it in future if my application code size increase. I guess I can increase now to utilise remain bytes to test.
For now OTA size is big enough for me. I may increase it in future if my application code size increase. I guess I can increase now to utilise remain bytes to test.
Re: What is the purpose of two OTA partition?
Do I always need two OTA paritition for Update application over air.
I am considering another option to reduce my size in ROM. Can I have only OTA partition.
When OTA starts. I get .bin image via http get chunk by chunk and write to my SD card storage and overwrite my application reading from sd card file chunk by chunk.
Is this feasible?
My partition will look like this.
# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x9000, 0x4000
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
ota_0, app, ota_0, 0x10000, 0x1A0000
storage, data, fat, ,0x80000
I am considering another option to reduce my size in ROM. Can I have only OTA partition.
When OTA starts. I get .bin image via http get chunk by chunk and write to my SD card storage and overwrite my application reading from sd card file chunk by chunk.
Is this feasible?
My partition will look like this.
# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x9000, 0x4000
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
ota_0, app, ota_0, 0x10000, 0x1A0000
storage, data, fat, ,0x80000
Re: What is the purpose of two OTA partition?
You cant write to partition you are running from, so you need at least 2 partitions:
- 2x OTA
- factory + OTA
But now when you asking this question i have idea. Maybe, but just maybe, it is possible to write ota.bin image to sd card, then reboot esp32. Now, when bootloader find ota.bin file on SD card then perform ota update, delete image from sd card, restart esp32. Even if this is not possible then you can have similar procedure on factory partition. This way you can have two options to ota update, from sd card or from internet. Im assuming that ota update procedure from sd card requires minimum partition size, far less than your regular application.
- 2x OTA
- factory + OTA
But now when you asking this question i have idea. Maybe, but just maybe, it is possible to write ota.bin image to sd card, then reboot esp32. Now, when bootloader find ota.bin file on SD card then perform ota update, delete image from sd card, restart esp32. Even if this is not possible then you can have similar procedure on factory partition. This way you can have two options to ota update, from sd card or from internet. Im assuming that ota update procedure from sd card requires minimum partition size, far less than your regular application.
Who is online
Users browsing this forum: Baidu [Spider] and 136 guests