esp_image_verify() function
Verify an app image. If encryption is enabled, data will be transparently decrypted. Image validation checks: - Magic byte. - Partition smaller than 16MB. - All segments & image fit in partition. - 8 bit image checksum is valid. - SHA-256 of image is valid (if image has this appended). - (Signature) if signature verification is enabled.
Arguments
mode
Mode of operation (verify, silent verify, or load).
part
Partition to load the app from.
data
Pointer to the image metadata structure which is be filled in by this function. 'start_addr' member should be set (to the start address of the image.) Other fields will all be initialised by this function.
Return value
- ESP_OK if verify or load was successful - ESP_ERR_IMAGE_FLASH_FAIL if a SPI flash error occurs - ESP_ERR_IMAGE_INVALID if the image appears invalid. - ESP_ERR_INVALID_ARG if the partition or data pointers are invalid.
esp_image_verify() is called by 3 functions and calls 1 function:
![]()
esp_image_verify()
esp_image_verify():
![]()
esp_image_verify()