Chapter 2. API Reference
• ESP_ERR_INVALID_ARG: If the index of the public key to be revoked is incorrect.
• ESP_FAIL: If secure boot v2 has not been enabled.
Parameters
• index: - The index of the signature block to be revoked
Macros
OTA_SIZE_UNKNOWN
Used for esp_ota_begin() if new image size is unknown
OTA_WITH_SEQUENTIAL_WRITES
Used for esp_ota_begin() if new image size is unknown and erase can be done in incremental manner (assuming
write operation is in continuous sequence)
ESP_ERR_OTA_BASE
Base error code for ota_ops api
ESP_ERR_OTA_PARTITION_CONFLICT
Error if request was to write or erase the current running partition
ESP_ERR_OTA_SELECT_INFO_INVALID
Error if OTA data partition contains invalid content
ESP_ERR_OTA_VALIDATE_FAILED
Error if OTA app image is invalid
ESP_ERR_OTA_SMALL_SEC_VER
Error if the firmware has a secure version less than the running firmware.
ESP_ERR_OTA_ROLLBACK_FAILED
Error if flash does not have valid firmware in passive partition and hence rollback is not possible
ESP_ERR_OTA_ROLLBACK_INVALID_STATE
Error if current active firmware is still marked in pending validation state
(ESP_OTA_IMG_PENDING_VERIFY), essentially first boot of firmware image post upgrade and
hence firmware upgrade is not possible
Type Definitions
typedef uint32_t esp_ota_handle_t
Opaque handle for an application OTA update.
esp_ota_begin() returns a handle which is then used for subsequent calls to esp_ota_write() and esp_ota_end().
Enumerations
enum esp_ota_secure_boot_public_key_index_t
Secure Boot V2 public key indexes.
Values:
SECURE_BOOT_PUBLIC_KEY_INDEX_0
Points to the 0th index of the Secure Boot v2 public key
SECURE_BOOT_PUBLIC_KEY_INDEX_1
Points to the 1st index of the Secure Boot v2 public key
SECURE_BOOT_PUBLIC_KEY_INDEX_2
Points to the 2nd index of the Secure Boot v2 public key
Debugging OTA Failure
Espressif Systems 1026
Submit Document Feedback
Release v4.4