Simplest way for app to set next boot from factory.
Posted: Wed Sep 05, 2018 6:40 pm
I'm asking this because in my experience I always do something the hard way before some says "oh just do this"
I know the flash address range from the partition file, but I'm not sure how to get the factory partition for the OTA API. So given I know the address I could use the SPI flash API to erase the range of the OTADATA partition.
Should I just call spi_flash_erase_range(0xd000, 0x2000). Numbers from csv file.
Or maybe I should call esp_partition_find on the factory and use the partition_t to call esp_ota_set_boot_partition.
Any advice?
John A
I know the flash address range from the partition file, but I'm not sure how to get the factory partition for the OTA API. So given I know the address I could use the SPI flash API to erase the range of the OTADATA partition.
Should I just call spi_flash_erase_range(0xd000, 0x2000). Numbers from csv file.
Or maybe I should call esp_partition_find on the factory and use the partition_t to call esp_ota_set_boot_partition.
Any advice?
John A