Page 1 of 1

Switch factory partition after OTA

Posted: Wed Oct 09, 2024 9:26 am
by TibiTheToz
Hi,

I have released products into the wild wich have an OTA procedure availible with the factory, ota_0 & ota_1 partition type.

The initial factory partition has some bugs that we get rid of in the new version. After a successful OTA I want to switch
the factory partition the the new one (or the boot pointer) because in case of a reset factory, I don't want to reset to the original
buggy factory partition.

After reading documentation, I'm still not sure how to proceed.

How would you implement that ? And what are the things to be careful about ?

Thanks for your answers.

T.

Re: Switch factory partition after OTA

Posted: Thu Oct 10, 2024 11:38 am
by mikemoy
Have you looked into

esp_ota_get_next_update_partition();
and
esp_ota_set_boot_partition();

Or you could just send another OTA update so that both your ota_0 & ota_1 partitions have the same good new code.