I am lazy and don't want to mess around with kConfig. The Expressif doc'n is a bit unclear as to whether rollbacks occur by default if there is a upload failure, OR application crash / abort(). CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is the command it refers to.
Hello,
Please look few more informations regarding that.
CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE
Enable app rollback support
Found in: Bootloader config
After updating the app, the bootloader runs a new app with the “ESP_OTA_IMG_PENDING_VERIFY” state set. This state prevents the re-run of this app. After the first boot of the new app in the user code, the function should be called to confirm the operability of the app or vice versa about its non-operability. If the app is working, then it is marked as valid. Otherwise, it is marked as not valid and rolls back to the previous working app. A reboot is performed, and the app is booted before the software update. Note: If during the first boot a new app the power goes out or the WDT works, then roll back will happen. Rollback is possible only between the apps with the same security versions.
https://docs.espressif.com/projects/esp ... ack-enable
It has been mentioned that itg will be worked with state flag which is described into above contents.
So, Please verify and then let ESP32 SDK team know if still it is not working as per your requirement for roolback mechanism.