Espressif ESP32-S2 Programming Manual page 798

Table of Contents

Advertisement

Chapter 2. API Reference
const __attribute__((section(".rodata_custom_desc"))) esp_custom_app_desc_t custom_
app_desc
=
{
...
}
Offset for custom structure is sizeof(esp_image_header_t) + sizeof(esp_image_segment_header_t)
+ sizeof(esp_app_desc_t).
To guarantee that the custom structure is located in the image even if it is not used, you need to add:
• For Make: add COMPONENT_ADD_LDFLAGS += -u custom_app_desc into component.mk
• For Cmake:
add target_link_libraries(${COMPONENT_TARGET}
tom_app_desc") into CMakeLists.txt
API Reference
Header File
components/bootloader_support/include/esp_app_format.h
Structures
struct esp_image_header_t
Main header of binary image.
Public Members
uint8_t magic
Magic word ESP_IMAGE_HEADER_MAGIC
uint8_t segment_count
Count of memory segments
uint8_t spi_mode
flash read mode (esp_image_spi_mode_t as uint8_t)
uint8_t spi_speed : 4
flash frequency (esp_image_spi_freq_t as uint8_t)
uint8_t spi_size : 4
flash chip size (esp_image_flash_size_t as uint8_t)
uint32_t entry_addr
Entry address
uint8_t wp_pin
WP pin when SPI pins set via efuse (read by ROM bootloader, the IDF bootloader uses software to
configure the WP pin and sets this field to 0xEE=disabled)
uint8_t spi_pin_drv[3]
Drive settings for the SPI flash pins (read by ROM bootloader)
esp_chip_id_t
chip_id
Chip identification number
uint8_t min_chip_rev
Minimum chip revision supported by image
uint8_t reserved[8]
Reserved bytes in additional header space, currently unused
uint8_t hash_appended
If 1, a SHA256 digest "simple hash"(of the entire image) is appended after the checksum. Included
in image length. This digest is separate to secure boot and only used for detecting corruption. For secure
boot signed images, the signature is appended after this (and the simple hash is included in the signed
data).
Espressif Systems
787
Submit Document Feedback
"-u
cus-
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Table of Contents

Save PDF