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)
---
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 projects, resolving changed build or
driver interfaces, or checking runtime, networking, security, and hardware
behavior. Use the topic references for complete API details, configuration
conditions, examples, and release-specific fixes.
## Reference index
| Reference | Topics |
| --- | --- |
| [Build, toolchains, and components](references/build-and-components.md) | Installation, compiler and linker changes, dependencies, CMake targets, development tools |
| [Connectivity](references/connectivity.md) | HTTP, MQTT, ESP-NETIF, Ethernet, Wi-Fi, provisioning, Thread, Zigbee, Bluetooth |
| [Drivers and hardware](references/drivers-and-hardware.md) | Silicon revisions, GPIO, peripheral migrations, DMA, storage hardware, displays, sleep, LP cores |
| [Runtime and diagnostics](references/runtime-and-diagnostics.md) | FreeRTOS, heap, libc, VFS, filesystems, NVS, logging, tracing, core dumps, headers |
| [Security and cryptography](references/security-and-crypto.md) | PSA, TLS, secure boot, TEE, BluFi, NVS encryption, OTA |
## Build and dependency breaks
For 6.0, build with Python 3.10 or later and CMake 3.22.1 or later. If the
system CMake is too old, install the supported tool:
```sh
./tools/idf_tools.py install cmake
```
All targets use GCC 15.1.0 in 6.0. Default compiler warnings are errors with
`CONFIG_COMPILER_DISABLE_DEFAULT_ERRORS=n`; set
`CONFIG_COMPILER_DISABLE_GCC15_WARNINGS=y` to suppress new GCC 15 warnings.
Unmapped ELF input sections fail the link by default. Place custom sections
with a linker fragment or remove unused sections at the source;
`CONFIG_COMPILER_ORPHAN_SECTIONS` also offers `warning` and `place` modes.
The compiler defaults to `gnu23` for C and `gnu++26` for C++ in 6.0.0.
Review code and diagnostics when components relied on previous language modes.
Every component in `REQUIRES` or `PRIV_REQUIRES` must resolve to a registered
component, even when none of its symbols are used. In 6.0, declare each used
`esp_driver_*` component explicitly: `driver` no longer supplies most split
drivers transitively. Include FreeRTOS headers explicitly, including
`freertos/queue.h` and `freertos/semphr.h` when previously supplied by
`esp_event.h`. In 6.1, peripheral public headers also stop including FreeRTOS
headers transitively.
For 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`.
For component moves, binary-generation hooks, and tool properties, use the
[build reference](references/build-and-components.md).
## Removed and deprecated peripheral interfaces
The following legacy headers are removed in 6.0:
| Old interface | Migration |
| --- | --- |
| `driver/adc.h` | Oneshot, continuous, or calibration headers in `esp_adc` |
| `driver/timer.h` | `driver/gptimer.h` |
| `driver/rmt.h` | RMT TX/RX and encoder headers |
| `driver/pcnt.h` | `driver/pulse_cnt.h` |
| `driver/mcpwm.h` | `driver/mcpwm_prelude.h` |
The legacy I2S, DAC, temperature-sensor, and sigma-delta headers are also gone.
The legacy `driver/i2c.h` is end-of-life in 6.0 and scheduled for removal in 7.0.
Use the [driver reference](references/drivers-and-hardware.md) for all replacement
headers, I2C slave callbacks, GPIO changes, and LCD/DMA configuration changes.
For the new TWAI driver, add `esp_driver_twai` and include `esp_twai.h` and
`esp_twai_onchip.h`. Choose either this driver or legacy `driver/twai.h` per
application. Mixing them can cause crashes even when
`CONFIG_TWAI_SKIP_LEGACY_CONFLICT_CHECK=y` suppresses the startup check.
Replace `twai_read_alerts()` with `on_state_change` and `on_error`; call
`twai_node_receive_from_isr()` only inside `on_rx_done`.
In 6.0, I2C master NACKs return `ESP_ERR_INVALID_RESPONSE` instead of
`ESP_ERR_INVALID_STATE` for the transmit and defined-operation APIs listed
in the driver reference. In 6.0.0, remove `ESP_INTR_FLAG_SHARED` from SPI
master or slave interrupt allocation flags.
## Cryptography and security compatibility
For 6.0, port legacy Mbed TLS primitives to PSA Crypto. ESP-IDF initializes
PSA during normal startup; code doing crypto, parsing a certificate or key,
or starting TLS before that initialization must call `psa_crypto_init()` itself.
Initialize NVS before first use of 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.
Update TLS or DTLS 1.2 peers requiring finite-field DHE, RSA key exchange,
or static ECDH for 6.0, and replace certificates using curves below 250 bits.
ATECC608 integration with ESP-TLS is unavailable in 6.0.0 after the PSA
migration; firmware requiring ATECC608-backed TLS is incompatible with that release.
ECDSA Secure Boot V2 is disabled on ESP32-H2, ESP32-C5, and ESP32-P4 in
v5.5.5 because of a vulnerability in its secure boot flow; the restriction
also applies in v6.1. The affected targets differ for other releases, including
v5.4.5, which disables it on ESP32-H2. See the
[security reference](references/security-and-crypto.md) for the precise
release and target conditions, including preview targets in v5.2.8 and v5.3.6.
Before a direct Mbed TLS connection that verifies the server certificate,
call `mbedtls_ssl_set_hostname()` with the expected hostname and check its result.
ESP-TLS handles hostname setup for its callers. For 6.0.0, check endpoints
depending on the bundled trust store, which drops deprecated CA certificates.
## Network and client migration
The built-in HTTP server accepts only HTTP/1.1 in the final 5.4 release;
HTTP/1.0 support returns in 5.5.0. Starting with v6.0.3, the default accepted
request-body cap is 16 MB; set `CONFIG_HTTPD_MAX_REQ_BODY_LEN_KB` to change it.
v6.1.1 also applies this cap and fixes `Content-Length` value truncation.
For 6.0, replace `esp_netif_next()` with `esp_netif_find_if(predicate, ctx)`
for lookup, or traverse with `esp_netif_next_unsafe()` inside the TCP/IP context.
In 6.0.0, handle errors returned by `esp_netif_receive()`; the suppression
option was removed. The default lwIP IPv6 input hook drops all IPv6 packets
on interfaces without a link-local IPv6 address, even if a global address exists.
Update firmware and BluFi clients together for the PSA-backed negotiation:
the protocol sub-version changes from `0x03` to `0x04` in 6.0, and older clients
may fail negotiation. Custom clients need SHA-256, 3072-bit FFDHE keys, and AES-256.
In v5.4.5, update both ESP Wi-Fi peers for IEEE 802.11-2020 BIP replay-counter
(IPN) byte order. Older firmware drops protected broadcast management frames
from updated firmware after 256 frames per IGTK, including deauthentication
and disassociation frames.
BLE ISO and BLE Audio use LSB-first addresses in v6.1.1. Reverse byte order
when passing addresses between these APIs and native Bluedroid APIs, which
use MSB-first order. The [connectivity reference](references/connectivity.md)
also covers BLE Audio return types, codec lengths, and ISO sent-callback fields.
## Runtime defaults and memory placement
Picolibc is the default in 6.0, with `stdin`, `stdout`, and `stderr` shared
across tasks. Select `CONFIG_LIBC_NEWLIB=y` when task-local stream reassignment
is needed. `CONFIG_COMPILER_ASSERT_NDEBUG_EVALUATE` defaults off, so `assert()`
expressions are skipped with `NDEBUG`; move required calls or state changes outside them.
Most FreeRTOS and ring-buffer functions default to flash in 6.0. Use
`CONFIG_FREERTOS_IN_IRAM=y` and `CONFIG_RINGBUF_IN_IRAM=y` when the corresponding
functions must reside in IRAM. `CONFIG_SPI_MASTER_IN_IRAM` depends on
`CONFIG_FREERTOS_IN_IRAM`. Use `xRingbufferReceiveSplit()` or
`xRingbufferReceiveSplitFromISR()` for allow-split ring buffers.
`MALLOC_CAP_EXEC` can be absent at compile time with memory protection enabled;
guard requests with `#ifdef MALLOC_CAP_EXEC` and handle unavailable executable heap
allocation. For PSRAM stacks, replace `CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY=y`
with `CONFIG_FREERTOS_TASK_CREATE_ALLOW_EXT_MEM=y`.
See the [runtime reference](references/runtime-and-diagnostics.md) for task
cleanup and snapshot changes, VFS behavior, filesystem defaults, and heap tracking.
## OTA and hardware conditions
For 6.0, set `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 if the update server uses plain HTTP.
ESP32-P4 builds target silicon revision v3.0 by default in 6.0.0. For earlier
hardware, set `CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y` in `sdkconfig` 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.
On ESP32-C2 revision v2.0 with v6.1-beta1, Wi-Fi packet transmission may fail
with light sleep enabled. Disable light sleep when transmission is needed on
that combination. Wi-Fi Aware Pairing and Security on iOS is experimental;
pairing may fail on any model in the iPhone 17 lineup.
## Build, monitor, and feature quick reference
Use the Installation Manager to install v6.1 by tag or its tools for a checkout:
```sh
eim install -i v6.1
eim install -p esp-idf-v6.1
```
Enable the `MINIMAL_BUILD` build property to restrict built components;
`TEST_COMPONENTS` can still select test components. Use `idf_diag.py` to
collect ESP-IDF environment information and diagnostics for a failed build.
Supply an explicit port to monitor without resetting the device:
```sh
idf.py -p /dev/ttyUSB0 monitor --no-reset
```
Select Log V2 with `CONFIG_LOG_VERSION`; guard V2-specific formatting with
`ESP_LOG_VERSION == 2` in code supporting V1. Select V2 before enabling binary
logging. Core dumps in 6.0 use ELF with SHA-256 checks; binary dumps and CRC32 are gone.
Use `esp_sleep_get_wakeup_causes()` to inspect simultaneous wakeup sources as
a bitmap indexed by `esp_sleep_wakeup_cause_t`. Applications can attach and
detach sleep-retention modules at runtime in 6.1.
For image processing, v6.0.3 adds `esp_async_color_convert` for asynchronous
RGB/YUV conversion using DMA2D. RAW ISP input from memory is available in
v6.0.3, v5.5.6, and v6.1.1, allowing ISP tuning without a live sensor.