Closed
Description
Hello, I use v1.0.3 as an ESP-IDF component and I'd wish to use the app rollback for ensuring functionality after broken firmware update (Update.h
is used to perform the update). But after enabling CONFIG_APP_ROLLBACK_ENABLE
it does not simply work. After firmware update, the following snippet returns ESP_OTA_IMG_VALID
instead of expected ESP_OTA_IMG_PENDING_VERIFY
.
const esp_partition_t *cur_app = esp_ota_get_running_partition();
esp_ota_img_states_t ota_state;
esp_ota_get_state_partition(cur_app, &ota_state);
And after restarting without marking the image as valid, the same (updated) image will be loaded again. Not the original one - there is no rollback.
My partition table looks like this:
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x1E0000,
app1, app, ota_1, 0x1F0000,0x1E0000,
spiffs, data, spiffs, 0x3D0000,0x30000,
If there is any relevant data missing, I'll be happy to add it.
Is there a way how to make it work? Is the problem with the combination of ESP-IDF/Arduino framework?