OTA update : 2 partitions one with OTA program and second with application program
Posted: Wed Sep 22, 2021 9:14 am
Hello,
I wanted to inquire if it was possible to setup a 2 OTA partitions scheme where one contains the simple ota example for instance and its role would be to update then boot on the second partition (my actual application). Is it possible to OTA update just this second partition and for instance reboot the esp32 (from my main application) to the first partition where I can then wait for OTA ?
The way i have used it so far is that my first and second partition are actually the same in size and content (both contain OTA code AND my application code). If it's possible to separate both then I can have the smallest first OTA parition just for update and a second partition with just my application code (and a lot bigger in size). It seems to me that we have three partitions in the case of simple_ota_example : factory, ota_0 and ota_1. When I compile my code and flash it with usb, I assume it goes to factory and later when OTA happens it either goes to ota_0 or ota_1. Why then do we have 3 app partitions and not just let's say factory and ota_0 ?
Does what i'm saying make sense ? I have tried to dissect the example of simple_ota_example but cannot seem to see where the choice of partition to update happens. Also, I would also need to know how to reboot the ESP32 on a specific partition.
Thanks in advance guys
I wanted to inquire if it was possible to setup a 2 OTA partitions scheme where one contains the simple ota example for instance and its role would be to update then boot on the second partition (my actual application). Is it possible to OTA update just this second partition and for instance reboot the esp32 (from my main application) to the first partition where I can then wait for OTA ?
The way i have used it so far is that my first and second partition are actually the same in size and content (both contain OTA code AND my application code). If it's possible to separate both then I can have the smallest first OTA parition just for update and a second partition with just my application code (and a lot bigger in size). It seems to me that we have three partitions in the case of simple_ota_example : factory, ota_0 and ota_1. When I compile my code and flash it with usb, I assume it goes to factory and later when OTA happens it either goes to ota_0 or ota_1. Why then do we have 3 app partitions and not just let's say factory and ota_0 ?
Does what i'm saying make sense ? I have tried to dissect the example of simple_ota_example but cannot seem to see where the choice of partition to update happens. Also, I would also need to know how to reboot the ESP32 on a specific partition.
Thanks in advance guys