Chapter 2. API Reference
(continued from previous page)
I (612) esp_image: segment 4: paddr=0x00036600 vaddr=0x3ffb28e0 size=0x00000 ( 0)␣
,→load
I (654) esp_image: segment 5: paddr=0x00036608 vaddr=0x40080000 size=0x00400 (␣
,→1024) load
I (695) esp_image: segment 6: paddr=0x00036a10 vaddr=0x40080400 size=0x09600 (␣
,→38400) load
I (737) esp_image: segment 7: paddr=0x00040018 vaddr=0x400d0018 size=0x62e4c␣
,→(405068) map
I (847) esp_image: segment 8: paddr=0x000a2e6c vaddr=0x40089a00 size=0x06cec (␣
,→27884) load
I (888) esp_image: segment 9: paddr=0x000a9b60 vaddr=0x400c0000 size=0x00000 ( 0)␣
,→load
I (929) esp_image: segment 10: paddr=0x000a9b68 vaddr=0x50000000 size=0x00004 ( 4)␣
,→load
I (971) esp_image: segment 11: paddr=0x000a9b74 vaddr=0x50000004 size=0x00000 ( 0)␣
,→load
I (1012) esp_image: segment 12: paddr=0x000a9b7c vaddr=0x50000004 size=0x00000 (␣
,→0) load
For more details on the type of memory segments and their address ranges, see ESP32-S2 Technical Reference Manual
> System and Memory > Internal Memory [PDF].
3. The image has a single checksum byte after the last segment. This byte is written on a sixteen byte padded
boundary, so the application image might need padding.
4. If the hash_appended field from esp_image_header_t is set then a SHA256 checksum will be ap-
pended. The value of SHA256 is calculated on the range from first byte and up to this field. The length of this
field is 32 bytes.
5. If the options CONFIG_SECURE_SIGNED_APPS_SCHEME is set to ECDSA then the application image will
have additional 68 bytes for an ECDSA signature, which includes:
• version word (4 bytes),
• signature data (64 bytes).
Application Description
The DROM segment starts with the esp_app_desc_t structure which carries specific fields describing the appli-
cation:
• secure_version - see Anti-rollback.
• version - see App version. *
• project_name is filled from PROJECT_NAME. *
• time and date - compile time and date.
• idf_ver - version of ESP-IDF. *
• app_elf_sha256 - contains sha256 for the elf application file.
* - The maximum length is 32 characters, including null-termination character. For example, if the length of
PROJECT_NAME exceeds 32 characters, the excess characters will be disregarded.
This structure is useful for identification of images uploaded OTA because it has a fixed offset =
sizeof(esp_image_header_t) + sizeof(esp_image_segment_header_t). As soon as a device receives
the first fragment containing this structure, it has all the information to determine whether the update should be
continued or not.
Adding a Custom Structure to an Application
Customer also has the opportunity to have similar structure with a fixed offset relative to the beginning of the image.
The following pattern can be used to add a custom structure to your image:
Espressif Systems 786
Submit Document Feedback
Release v4.4