How espressif/esp-idf works
ESP-IDF is an embedded development framework for Espressif SoCs. An application uses framework APIs to perform device functions and persist state; OTA operations and boot-time image/security handling are distinct lifecycle capabilities. The sampled code confirms TEE secure storage uses NVS, while the tree identifies Bluetooth bonding storage, app tracing, and hardware SHA support. Their broader call wiring is not established by the excerpts, so those subsystems are shown without speculative connections.
Main entry points: app_trace.c Application tracing · bootloader_start.c Bootloader startup · esp_ota_ops.c OTA operations · bootloader_utility.c Boot utilities
Components 18
Device lifecycle
- OTA operations
components/app_update/esp_ota_ops.c - OTA auto-confirm
components/app_update/ota_auto_confirm.c - Bootloader startup
components/bootloader/subproject/main/bootloader_start.c - Boot utilities
components/bootloader_support/src/bootloader_utility.c - Secure boot
components/bootloader_support/src/secure_boot.c - Flash access
components/bootloader_support/bootloader_flash/src/bootloader_flash.c
Persistence and security
- NVS storage
components/nvs_flash/src/nvs_storage.cpp - TEE secure storage
components/esp_tee/subproject/components/tee_sec_storage/tee_sec_storage.c
Bluetooth
- BLE bond storage
components/bt/host/bluedroid/btc/core/btc_ble_storage.c - Bluetooth storage
components/bt/host/bluedroid/btc/core/btc_storage.c
Diagnostics and crypto
- Application tracing
components/app_trace/app_trace.c - UART trace port
components/app_trace/port/port_uart.c - JTAG trace port
components/app_trace/port/xtensa/port_jtag.c - Hardware SHA API
components/mbedtls/port/include/sha/sha_parallel_engine.h
Application runtime
- Thread-local storage
components/pthread/pthread_local_storage.c
Other components
- Device application
- Espressif SoC
- Bluetooth peer
Connections 17
- Device application → OTA operations: requests update
- Device application → TEE secure storage: uses secure keys
- TEE secure storage → NVS storage: reads/writes
- Device application → BLE bond storage: uses bonding
- Device application → Bluetooth storage: uses bond records
- Bluetooth peer → BLE bond storage: bond information
- Device application → Application tracing: emits trace
- Application tracing → UART trace port: routes trace
- Application tracing → JTAG trace port: routes trace
- Device application → Hardware SHA API: hashes data
- Device application → Thread-local storage: uses thread state
- Espressif SoC → Hardware SHA API: provides engine
- Espressif SoC → Flash access: provides flash
- Bootloader startup → Boot utilities: uses boot utilities
- Bootloader startup → Secure boot: checks image
- Boot utilities → Flash access: accesses flash
- OTA operations → OTA auto-confirm: confirmation support