Select one of the symbols to view example projects that use it.
 
Outline
#include <inttypes.h>
#include "esp_assert.h"
esp_chip_id_t
esp_image_spi_mode_t
esp_image_spi_freq_t
esp_image_flash_size_t
#define ESP_IMAGE_HEADER_MAGIC
esp_image_header_t
esp_image_segment_header_t
#define ESP_IMAGE_MAX_SEGMENTS
Files
ESP-IDF
components
app_trace
app_update
bootloader_support
bootloader_flash
include
private_include
src
bt
cmock
console
cxx
driver
efuse
esp_adc
esp_app_format
esp_bootloader_format
esp_coex
esp_common
esp_driver_ana_cmpr
esp_driver_cam
esp_driver_dac
esp_driver_gpio
esp_driver_gptimer
esp_driver_i2c
esp_driver_i2s
esp_driver_jpeg
esp_driver_ledc
esp_driver_mcpwm
esp_driver_parlio
esp_driver_pcnt
esp_driver_rmt
esp_driver_sdio
esp_driver_sdm
esp_driver_sdmmc
esp_driver_sdspi
esp_driver_spi
esp_driver_tsens
esp_driver_uart
esp_driver_usb_serial_jtag
esp_eth
esp_event
esp_gdbstub
esp_hid
esp_http_client
esp_http_server
esp_https_ota
esp_https_server
esp_hw_support
esp_lcd
esp_local_ctrl
esp_mm
esp_netif
esp_partition
esp_phy
esp_pm
esp_psram
esp_ringbuf
esp_rom
esp_security
esp_system
esp_timer
esp_vfs_console
esp_wifi
esp-tls
espcoredump
hal
heap
http_parser
ieee802154
log
mqtt
newlib
nvs_flash
nvs_sec_provider
openthread
perfmon
protobuf-c
protocomm
pthread
rt
sdmmc
soc
spi_flash
spiffs
tcp_transport
ulp
unity
vfs
wear_levelling
wifi_provisioning
wpa_supplicant
xtensa
examples
lwIP
FreeRTOS
cJSON
mbedTLS
SourceVuESP-IDF Framework and ExamplesESP-IDFcomponents/bootloader_support/include/esp_app_format.h
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 *//* ... */ #pragma once #include <inttypes.h> #include "esp_assert.h" #ifdef __cplusplus extern "C" { #endif /** * @brief ESP chip ID * *//* ... */ typedef enum { ESP_CHIP_ID_ESP32 = 0x0000, /*!< chip ID: ESP32 */ ESP_CHIP_ID_ESP32S2 = 0x0002, /*!< chip ID: ESP32-S2 */ ESP_CHIP_ID_ESP32C3 = 0x0005, /*!< chip ID: ESP32-C3 */ ESP_CHIP_ID_ESP32S3 = 0x0009, /*!< chip ID: ESP32-S3 */ ESP_CHIP_ID_ESP32C2 = 0x000C, /*!< chip ID: ESP32-C2 */ ESP_CHIP_ID_ESP32C6 = 0x000D, /*!< chip ID: ESP32-C6 */ ESP_CHIP_ID_ESP32H2 = 0x0010, /*!< chip ID: ESP32-H2 */ ESP_CHIP_ID_ESP32P4 = 0x0012, /*!< chip ID: ESP32-P4 */ ESP_CHIP_ID_ESP32C5 = 0x0017, /*!< chip ID: ESP32-C5 */ ESP_CHIP_ID_INVALID = 0xFFFF /*!< Invalid chip ID (we defined it to make sure the esp_chip_id_t is 2 bytes size) */ }{ ... } __attribute__((packed)) esp_chip_id_t; /** @cond */ ESP_STATIC_ASSERT(sizeof(esp_chip_id_t) == 2, "esp_chip_id_t should be 16 bit"); /** @endcond */ /** * @brief SPI flash mode, used in esp_image_header_t *//* ... */ typedef enum { ESP_IMAGE_SPI_MODE_QIO, /*!< SPI mode QIO */ ESP_IMAGE_SPI_MODE_QOUT, /*!< SPI mode QOUT */ ESP_IMAGE_SPI_MODE_DIO, /*!< SPI mode DIO */ ESP_IMAGE_SPI_MODE_DOUT, /*!< SPI mode DOUT */ ESP_IMAGE_SPI_MODE_FAST_READ, /*!< SPI mode FAST_READ */ ESP_IMAGE_SPI_MODE_SLOW_READ /*!< SPI mode SLOW_READ */ }{ ... } esp_image_spi_mode_t; /** * @brief SPI flash clock division factor. *//* ... */ typedef enum { ESP_IMAGE_SPI_SPEED_DIV_2, /*!< The SPI flash clock frequency is divided by 2 of the clock source */ ESP_IMAGE_SPI_SPEED_DIV_3, /*!< The SPI flash clock frequency is divided by 3 of the clock source */ ESP_IMAGE_SPI_SPEED_DIV_4, /*!< The SPI flash clock frequency is divided by 4 of the clock source */ ESP_IMAGE_SPI_SPEED_DIV_1 = 0xF /*!< The SPI flash clock frequency equals to the clock source */ }{ ... } esp_image_spi_freq_t; /** * @brief Supported SPI flash sizes *//* ... */ typedef enum { ESP_IMAGE_FLASH_SIZE_1MB = 0, /*!< SPI flash size 1 MB */ ESP_IMAGE_FLASH_SIZE_2MB, /*!< SPI flash size 2 MB */ ESP_IMAGE_FLASH_SIZE_4MB, /*!< SPI flash size 4 MB */ ESP_IMAGE_FLASH_SIZE_8MB, /*!< SPI flash size 8 MB */ ESP_IMAGE_FLASH_SIZE_16MB, /*!< SPI flash size 16 MB */ ESP_IMAGE_FLASH_SIZE_32MB, /*!< SPI flash size 32 MB */ ESP_IMAGE_FLASH_SIZE_64MB, /*!< SPI flash size 64 MB */ ESP_IMAGE_FLASH_SIZE_128MB, /*!< SPI flash size 128 MB */ ESP_IMAGE_FLASH_SIZE_MAX /*!< SPI flash size MAX */ }{ ... } esp_image_flash_size_t; #define ESP_IMAGE_HEADER_MAGIC 0xE9 /*!< The magic word for the esp_image_header_t structure. */ /** * @brief Main header of binary image *//* ... */ typedef struct { 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; /*!< Minimal chip revision supported by image * After the Major and Minor revision eFuses were introduced into the chips, this field is no longer used. * But for compatibility reasons, we keep this field and the data in it. * Use min_chip_rev_full instead. * The software interprets this as a Major version for most of the chips and as a Minor version for the ESP32-C3. *//* ... */ uint16_t min_chip_rev_full; /*!< Minimal chip revision supported by image, in format: major * 100 + minor */ uint16_t max_chip_rev_full; /*!< Maximal chip revision supported by image, in format: major * 100 + minor */ uint8_t reserved[4]; /*!< 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). *//* ... */ }{ ... } __attribute__((packed)) esp_image_header_t; /** @cond */ ESP_STATIC_ASSERT(sizeof(esp_image_header_t) == 24, "binary image header should be 24 bytes"); /** @endcond */ /** * @brief Header of binary image segment *//* ... */ typedef struct { uint32_t load_addr; /*!< Address of segment */ uint32_t data_len; /*!< Length of data */ }{ ... } esp_image_segment_header_t; #define ESP_IMAGE_MAX_SEGMENTS 16 /*!< Max count of segments in the image. */ #ifdef __cplusplus }{...} #endif
Details
Show:
from
Types: Columns:
This file uses the notable symbols shown below. Click anywhere in the file to view more details.