Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Esp Idf Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-esp-idf-knowledge-patch-nevaberry-plugins)
---
name: esp-idf-knowledge-patch
description: ESP-IDF
version: "6.1.1"
license: MIT
metadata:
author: Nevaberry
---
# ESP-IDF compatibility guidance
Load this skill when migrating ESP-IDF applications, updating component
dependencies, adapting driver or protocol APIs, or checking changed defaults.
Use the topic references for complete guidance and release-specific conditions.
## Reference index
| Reference | Topics |
| --- | --- |
| [Build, Tooling, and Components](references/build-tooling-and-components.md) | Installation, compilers, CMake, dependencies, bootloader builds, CLI and debugging |
| [Cryptography and Security](references/crypto-and-security.md) | PSA, Mbed TLS, ESP-TLS, Secure Boot, certificates, provisioning security and TEE |
| [Drivers and Hardware](references/drivers-and-hardware.md) | Silicon revisions, GPIO, peripheral migrations, DMA, flash, SD, image processing, LCD and USB |
| [Networking and Protocols](references/networking-and-protocols.md) | HTTP, MQTT delivery, ESP-NETIF, IPv6, DHCP, DNS, Ethernet, Thread and Zigbee |
| [System, Runtime, and Logging](references/system-runtime-and-logging.md) | FreeRTOS, libc, memory, VFS, filesystems, OTA, boot, sleep, LP core and tracing |
| [Wireless and Bluetooth](references/wireless-and-bluetooth.md) | Wi-Fi, ESP-NOW, provisioning, NAN, IEEE 802.15.4, Bluedroid, BLE Audio, Mesh and NimBLE |
## Breaking changes and deprecations
### Build requirements and compiler diagnostics
For ESP-IDF 6.0, use Python 3.10 or later and CMake 3.22.1 or later.
Run `./tools/idf_tools.py install cmake` when the system CMake is too old.
GCC 15.1.0 is used on all targets; default compiler warnings are errors with
`CONFIG_COMPILER_DISABLE_DEFAULT_ERRORS=n`. Unmapped ELF input sections fail
the link by default: place custom sections with a linker fragment or remove
unused sections at the source. ESP-IDF 6.0.0 defaults to `gnu23` and `gnu++26`.
### Explicit dependencies and managed components
Every component in `REQUIRES` or `PRIV_REQUIRES` must resolve to a registered
component, even when none of its symbols would be used.
In ESP-IDF 6.0, declare each used `esp_driver_*` component explicitly; the
legacy `driver` component no longer provides most split drivers transitively.
Include FreeRTOS declarations directly, including `freertos/queue.h` and
`freertos/semphr.h` when previously pulled in by `esp_event.h`.
In 6.1, peripheral driver public headers also stop including FreeRTOS transitively.
For ESP-IDF 6.0, remove `json` from CMake dependencies and declare
`espressif/cjson: "^1.7.19"` in the `dependencies` map of `idf_component.yml`.
Add MQTT with `idf.py add-dependency espressif/mqtt`.
USB, touch element, and NT35510 LCD components also move to the registry;
the build reference preserves their exact dependency commands.
### Removed peripheral drivers
In ESP-IDF 6.0, replace legacy ADC APIs with the oneshot, continuous, or
calibration headers in `esp_adc`. Port `driver/timer.h` to `driver/gptimer.h`,
`driver/pcnt.h` to `driver/pulse_cnt.h`, and `driver/mcpwm.h` to
`driver/mcpwm_prelude.h`. Port legacy RMT to the TX/RX and encoder headers.
Legacy I2S, DAC, temperature-sensor, and sigma-delta headers are also removed;
use the replacement headers detailed in the drivers reference.
The legacy `driver/i2c.h` is end-of-life in 6.0 and scheduled for removal in 7.0.
### I2C and GPIO behavior
In ESP-IDF 6.0, redesigned I2C slave reception uses master-triggered callbacks,
and outgoing data is queued with `i2c_slave_write()`. The old receive,
transmit, and slave RAM read/write APIs are gone.
I2C master transmit and defined-operation calls listed in the drivers reference
return `ESP_ERR_INVALID_RESPONSE` for NACKs, replacing `ESP_ERR_INVALID_STATE`.
Shared-pin driver objects use the same GPIO number; `io_loop_back` is removed.
Use `gpio_od_enable()` where a driver drops `io_od_mode`, and apply MCPWM
generator, fault, sync, and capture pulls with `gpio_set_pull_mode()`.
### PSA migration and TLS compatibility
In ESP-IDF 6.0, port legacy Mbed TLS primitives to PSA Crypto. Normal startup
initializes PSA; code doing crypto, certificate/key parsing, or TLS before that
initialization must call `psa_crypto_init()` itself.
Initialize NVS before first using PSA persistent keys. In 6.1, re-import
persistent PSA ECDSA and HMAC opaque keys stored by earlier ESP-IDF versions
because their storage format changed.
Built-in wolfSSL support is removed in 6.0; use Mbed TLS or register a custom
stack with `esp_tls_register_stack()` before creating connections.
ATECC608 integration is unavailable in 6.0.0 after the PSA migration.
Update TLS/DTLS 1.2 peers requiring finite-field DHE, RSA key exchange, or static
ECDH, and replace certificates using curves below 250 bits for the 6.0 migration.
When using Mbed TLS directly to verify a server certificate, call
`mbedtls_ssl_set_hostname()` with the expected hostname before the connection
and check the result. ESP-TLS handles hostname setup for its callers.
### Secure Boot and hardware security support
ECDSA Secure Boot V2 is disabled on ESP32-H2, ESP32-C5, and ESP32-P4 in v5.5.5
because of a vulnerability in the ECDSA secure boot flow; the restriction also
applies in v6.1. See the security reference for other release-specific target
restrictions.
Hardware Key Manager support is removed on ESP32-C5, ESP32-P4, and ESP32-S31
in v5.5.6 and v6.1.1.
### C library and task lifecycle
In ESP-IDF 6.0, Picolibc is the default and shares `stdin`, `stdout`, and
`stderr` across tasks. Select `CONFIG_LIBC_NEWLIB=y` when task-local stream
reassignment is needed. With `NDEBUG` set, `assert()` expressions are skipped
by default; move required calls or state changes outside assertions.
Non-priority global constructors run in ascending order on both Xtensa and
RISC-V, reversing the earlier order for these constructors.
In 6.0.0, the port stops calling application-defined `vPortCleanUpTCB()`;
move cleanup into the application's task lifecycle.
### Ring buffers and IRAM placement
Use `xRingbufferReceiveSplit()` or `xRingbufferReceiveSplitFromISR()` for
allow-split ring buffers; the ordinary receive APIs reject that buffer type
in ESP-IDF 5.5.0.
In 6.0, most FreeRTOS and ring-buffer functions default to flash. Use
`CONFIG_FREERTOS_IN_IRAM=y` and `CONFIG_RINGBUF_IN_IRAM=y` when the corresponding
functions must be in IRAM. `CONFIG_SPI_MASTER_IN_IRAM` depends on
`CONFIG_FREERTOS_IN_IRAM`.
### HTTP compatibility and network interfaces
The final 5.4 HTTP server accepts only HTTP/1.1; 5.5.0 restores HTTP/1.0 requests.
Starting with v6.0.3, the HTTP server caps accepted request bodies at 16 MB by
default. Set `CONFIG_HTTPD_MAX_REQ_BODY_LEN_KB` to change the limit. In v6.1.1,
the server also applies this cap and fixes `Content-Length` value truncation.
The default lwIP IPv6 input hook drops all IPv6 packets on interfaces without
a link-local address, even when a global IPv6 address is assigned.
In 6.0, replace removed `esp_netif_next()` with `esp_netif_find_if(predicate, ctx)`
or traverse using `esp_netif_next_unsafe()` inside the TCP/IP context.
### Wi-Fi callbacks, provisioning, and peer compatibility
For ESP-IDF 5.5, the ESP-NOW send callback's first parameter becomes a pointer
to `esp_now_send_info_t`, containing transmit information rather than a
MAC-address byte buffer. In 6.0, a second `esp_wifi_init()` on an initialized
driver returns `ESP_ERR_INVALID_STATE` instead of `ESP_OK`.
Replace `wifi_provisioning` with `network_provisioning` for the 6.0 migration;
when using the new component on ESP-IDF 5.x, add `wifi_provisioning` to
`EXCLUDE_COMPONENTS`.
In v5.4.5, update both ESP peers for the IEEE 802.11-2020 BIP replay-counter byte
order: older firmware drops updated peers' protected broadcast management
frames after 256 frames per IGTK, including deauthentication and disassociation.
### BLE Audio and ISO API changes
In v6.1.1, `esp_ble_audio_tmap_set_role()` and `esp_ble_audio_tbs_register_cb()`
return `esp_err_t`; update function pointers expecting `void`.
BLE Audio subgroup codec data and metadata getters take length output parameters.
BLE ISO and Audio use LSB-first addresses; reverse bytes when exchanging
addresses with native Bluedroid APIs, which use MSB-first order.
The sent callback's `esp_ble_iso_tx_cb_info_t` reports per SDU through `sdu[]`,
`framing`, and `version`; migrate the removed packet fields and drift flag.
### ESP32-P4 boot and LP-SPI conditions
ESP-IDF 6.0.0 targets ESP32-P4 v3.0 by default. For pre-v3.0 hardware, set
`CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y` before reconfiguring or building.
On ESP32-P4 with v6.0 through v6.0.3, LP-SPI full-duplex and LSB-first
master/slave transfers can return stale or zero MISO data. Use 3-wire (SIO)
transfers on those releases or upgrade to v6.1 for the fix.
The runtime reference preserves the bootloader-version conditions for the
v6.1.1 PSRAM XIP reset fix and the v6.1.1/v5.4.5 flash-remapping boot fix.
## Frequently used features and configuration
### Installation and minimal builds
Install v6.1 and its tools with `eim install -i v6.1`, or install tools for an
existing checkout with `eim install -p esp-idf-v6.1`.
Enable `MINIMAL_BUILD` to restrict built components; `TEST_COMPONENTS` can
still include selected test components.
```cmake
cmake_minimum_required(VERSION 3.16)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
idf_build_set_property(MINIMAL_BUILD ON)
project(my_app)
```
### OTA and rollback
OTA can resume a partial download after an error or reboot, and can update
bootloader, partition-table, and NVS partitions in addition to application slots.
Use `esp_ota_mark_app_invalid_rollback()` to mark an app invalid and choose
when to restart. In 6.0, enable `CONFIG_ESP_HTTPS_OTA_ENABLE_PARTIAL_DOWNLOAD=y`
before enabling partial HTTP downloads in the OTA configuration.
In v6.1.1 and v5.4.5, `esp_https_ota` rejects `http://` URLs by default;
explicitly enable HTTP downloads when the update server uses plain HTTP.
### Logging and monitoring
Select Log V2 with `CONFIG_LOG_VERSION`; guard V2-specific formatting with
`ESP_LOG_VERSION == 2` in code also supporting V1. Select V2 before enabling
binary logging. Replace deprecated `esp_log_buffer_hex` and
`esp_log_buffer_char` with `ESP_LOG_BUFFER_HEX` and `ESP_LOG_BUFFER_CHAR`.
IDF Monitor adds host coloring by default; `CONFIG_LOG_COLORS=y` enables
device colors for other monitors. Use `idf.py monitor --disable-auto-color`
to disable host coloring. To monitor without reset, supply an explicit port:
`idf.py -p /dev/ttyUSB0 monitor --no-reset`.
### Heap buffers and image processing
Request `MALLOC_CAP_SIMD` for buffers used with SIMD on supported targets.
In v5.5.5, v6.0.3, and v6.1, `CONFIG_SPIRAM_ENC_EXEMPT` reserves unencrypted
PSRAM; allocate with `MALLOC_CAP_SPIRAM_NO_ENC` to avoid PSRAM encryption's
alignment constraints.
In v6.0.3, `esp_async_color_convert` converts RGB and YUV asynchronously with
DMA2D, and UART DMA can send multiple non-contiguous buffers in one operation.
ISP RAW input from memory is available in v6.0.3, v5.5.6, and v6.1.1.
### Wi-Fi and runtime sleep features
In 6.1, SoftAP supports OWE-only operation, and stations can receive multiple
network configurations through DPP. Wi-Fi Aware Pairing and Security for iOS
is experimental; pairing may fail on any model in the iPhone 17 lineup.
Applications can attach and detach sleep-retention modules while running.