What is the purpose of two OTA partition?
What is the purpose of two OTA partition?
Hi ESP-IDF,
Is the second one always reserved for back-up purpose?
(Yes, I know I still not investigate enough time on google about this question. But I just wanna know it faster... )
Cheer
Gfast2
Is the second one always reserved for back-up purpose?
(Yes, I know I still not investigate enough time on google about this question. But I just wanna know it faster... )
Cheer
Gfast2
Re: What is the purpose of two OTA partition?
You can't erase currently running app
Re: What is the purpose of two OTA partition?
Hi WiFive,WiFive wrote:You can't erase currently running app
Thanks for short + clear answer. I believe what I'm not clear is:
Is that means: The Bootloader will never ever update the partition of the factory partition. but only update the contents of one of both ota partition. So what is the point two wast another 1M precious spi flash space?
Re: What is the purpose of two OTA partition?
Perhapse I just investigate too much time on these meaning less point:
1. I figured out the csv partition table in docu about Partition Tables do not have "," on each line. But the example partition csv file for spiffs, they have. why? Are both correct?
2. "Factory app, two OTA definitions" from the docu show the Type for ota partition is "0" and subtype is "ota_1" or/and "ota_2", but in another docu said:
Cheers
Gfast2
1. I figured out the csv partition table in docu about Partition Tables do not have "," on each line. But the example partition csv file for spiffs, they have. why? Are both correct?
2. "Factory app, two OTA definitions" from the docu show the Type for ota partition is "0" and subtype is "ota_1" or/and "ota_2", but in another docu said:
It does make me... not sure if I understand everything correctly.An OTA data partition (type data, subtype ota)
Cheers
Gfast2
Re: What is the purpose of two OTA partition?
Factory will not be updated, but it is also not required. But it is insurance to be able to factory reset to a (hopefully) known stable firmware even after many ota updates.
Re: What is the purpose of two OTA partition?
Hi WiFive,WiFive wrote:Factory will not be updated, but it is also not required. But it is insurance to be able to factory reset to a (hopefully) known stable firmware even after many ota updates.
It is a very good point to reserve the factory app. It let me feel we a making something really works for another 100 years.
As a more concrete expression, I write two partition csv setting for the same purpose, according to two different docus I mentioned above.
I will checkout if both of them works:
1. for ota updating
2. for spiffs partition filesystem accessing
Code: Select all
# Name, Type, Subtype, Offset, Size
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 1M,
ota_1, 0, ota_1, , 1M,
ota_2, 0, ota_2, , 1M,
storage, data, spiffs, , 0xF0000,
Code: Select all
# Name, Type, Subtype, Offset, Size
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 1M,
ota_1, data, ota, , 1M,
ota_2, data, ota, , 1M,
storage, data, spiffs, , 0xF0000,
Re: What is the purpose of two OTA partition?
Hi I come back,
With partition table:
I got error:
This error code is specified in "~/esp/esp-idf/components/spiffs/spiffs/src/spiffs.h" as "SPIFFS_ERR_NOT_A_FS", and then the task watch dog is triggered.
I think that is something wrong with "0xF0000".
cheers
With partition table:
Code: Select all
# Name, Type, Subtype, Offset, Size
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 1M,
ota_1, 0, ota_1, , 1M,
ota_2, 0, ota_2, , 1M,
storage, data, spiffs, , 0xF0000,
Code: Select all
W (201) SPIFFS: mount failed, -10025. formatting...
I think that is something wrong with "0xF0000".
cheers
Re: What is the purpose of two OTA partition?
Man can actually also remove this feature by:WiFive wrote:Factory will not be updated, but it is also not required. But it is insurance to be able to factory reset to a (hopefully) known stable firmware even after many ota updates.
RTFM ( ): DocIf you want to conserve flash usage in an OTA project, you can remove the factory partition and use ota_0 instead.
Re: What is the purpose of two OTA partition?
Ach!!!
Because:
0x10000 -> 64KB
0xF0000 -> 960KB
Which is no more available free space for the device (64KB + 1MB + 1MB + 1MB + 960KB > 4MB). So for my spiffs partition I just use "500KB" instead. Which let everything works again.
CHEERS
Gfast2
Because:
0x10000 -> 64KB
0xF0000 -> 960KB
Which is no more available free space for the device (64KB + 1MB + 1MB + 1MB + 960KB > 4MB). So for my spiffs partition I just use "500KB" instead. Which let everything works again.
Code: Select all
# Name, Type, Subtype, Offset, Size
nvs, data, nvs, 0x9000, 0x6000,
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,
CHEERS
Gfast2
Re: What is the purpose of two OTA partition?
Sorry I have arrived late to this post, but since the subject is very clear, didn't want to open a new one regarding the same thing.
I have a Flash shortage, and using OTA with one factory partition, just enough to connect and download the new binary.
And two OTA partitions to write the new image and have one as backup.
Now I'm considering using just the factory boot/update partition and one OTA.
When the device receives the update FW command, it selects the factory partition and restarts, so the update takes from there.
Up until now we have tested hundreds of times the update process via WIFI and there were no issues.
And now the question... do you see some danger in this approach, one that I couldn't see until now ?
The only one I see is that the update process failing to write somewhere in the OTA partition and then not possible to boot that one, but the factory firmware will keep executing to update again, and at some point it should succeed.
BR, Robert.
I have a Flash shortage, and using OTA with one factory partition, just enough to connect and download the new binary.
And two OTA partitions to write the new image and have one as backup.
Now I'm considering using just the factory boot/update partition and one OTA.
When the device receives the update FW command, it selects the factory partition and restarts, so the update takes from there.
Up until now we have tested hundreds of times the update process via WIFI and there were no issues.
And now the question... do you see some danger in this approach, one that I couldn't see until now ?
The only one I see is that the update process failing to write somewhere in the OTA partition and then not possible to boot that one, but the factory firmware will keep executing to update again, and at some point it should succeed.
BR, Robert.
Who is online
Users browsing this forum: Baidu [Spider] and 90 guests