Skip to content

Bump to Espressif's ESP-IDF 6.1 - #11513

Merged
tannewt merged 3 commits into
adafruit:mainfrom
mikeysklar:espressif-idf-v6.1
Oct 6, 2026
Merged

tannewt merged 3 commits into
adafruit:mainfrom
mikeysklar:espressif-idf-v6.1

Conversation

@mikeysklar

@mikeysklar mikeysklar commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

What

ESP32 boards now build with ESP-IDF 6.1 instead of 6.0.1.

Why

6.1 includes Espressif's fix for SD cards failing when reopened, which #11500 was patching by hand.

Hardware tested

Ubuntu 24.04 host. CIRCUITPY files matched their backups after updating.

Board Commit REPL sha256 WiFi scan ssl
Metro ESP32-S3 505a514 ok ok 15 networks ok
Metro ESP32-S2 7d55c54 ok ok 8 networks ok
P4 GPIO (rev < 3) 7d55c54 ok ok n/a n/a
ESP32-C5 DevKitC-1 N8R8 505a514 ok ok 30 networks ok
Feather ESP32-C6 4MB 505a514 ok ok 6 networks ok, HTTPS GET 200
microSD over SPI, Metro ESP32-S3, 505a514 Result
256 KB write, read back sha256 match
Mount, list, unmount, deinit 10 of 10
Test commands and C5 output
import os,gc,microcontroller as m,hashlib,binascii;print("VER",os.uname().version);print("CPU",m.cpu.frequency,m.cpu.temperature);h=hashlib.new("sha256",b"abc");print("SHA",binascii.hexlify(h.digest())[:16]);print("FS",len(os.listdir("/")));gc.collect();print("MEM",gc.mem_free())
import wifi,ssl;n=[x.ssid for x in wifi.radio.start_scanning_networks()];wifi.radio.stop_scanning_networks();print("WIFI",len(n),"networks");print("SSL",ssl.create_default_context() is not None)
VER 11.0.0-alpha.1-37-g505a514e4d on 2026-10-06
CPU 240000000 27.5
SHA b'ba7816bf8f01cfea'
FS 12
MEM 8263200
WIFI 30 networks
SSL True
Not tested on hardware
Chips ESP32, C2, C3, C61, H2, P4 rev 3 (all build)
Features BLE beyond C6 workflow advertising, ULP, deep sleep, SDMMC (sdioio), H2 48 MHz flash

ESP-IDF patches

adafruit/esp-idf branch circuitpython-v6.1 is upstream v6.1 plus these.

Patch Status
Fix sleep without console kept
Getter for PSRAM address kept
48 MHz flash clock for ESP32-H2 kept
#ifdef fix in esp_lcd_io_parl.h kept
Quiet the RMT warning from neopixel kept
Let both ULP types be on at once dropped, 6.1 does it

Build changes

6.1 moved and split some files, so the Makefile follows.

Change Why
New paths for systimer and heap ROM scripts moved in 6.1
P4 ROM scripts renamed (eco5 to plain, plain to eco0_4) rev 3 is now the default
Link esp_hal_systimer split out of hal in 6.1
Link esp_hal_regi2c, except ESP32, C2, C3, S3 split out of hal in 6.1; those four have it in ROM
New mbedtls library names mbedtls 4.1 split them
Always link IDF libmbedtls.a boards without WiFi failed to link
Find the BLE library the way IDF does H2 library moved
Drop stale ULP comment in S2/S3 defaults patch no longer needed
C5: CIRCUITPY_ULAB_OPTIMIZE_SIZE = 1 (from #11403) see below

C5 firmware size

6.1's WiFi libraries push the C5 past its 2 MB firmware.

C5, ru translation Free bytes
Before ulab flag -2448
After ulab flag 3024

Cost: ulab array math up to 1.7x slower (#11403).

AI assistance

Made with Claude Code. I reviewed the diff and ran every hardware test myself.

Point esp-idf at adafruit/esp-idf circuitpython-v6.1 (upstream v6.1
plus CircuitPython patches) and follow the 6.1 component moves:
systimer, heap and P4 ROM linker scripts, esp_hal_systimer and
esp_hal_regi2c, the mbedtls 4.1 library split, and the BLE library
lookup.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@mikeysklar
mikeysklar requested review from ladyada and tannewt October 6, 2026 02:02
mikeysklar and others added 2 commits October 5, 2026 20:14
ESP-IDF 6.1's WiFi libraries grew the C5 image past its 2MB partition
in five translations (ru was 2448 bytes over). Use the
CIRCUITPY_ULAB_OPTIMIZE_SIZE function-pointer dispatch from adafruit#11403.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- Remove the leftover second line of the old ULP comment in the S2/S3
  defaults.
- IDF libmbedtls.a is now always linked, so drop mbedtls from the WiFi
  component list.
- Shorten the BLE lib lookup and C5 ulab comments.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@dhalbert dhalbert left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, and the testing is very helpful.

@tannewt
tannewt merged commit dd47e6f into adafruit:main Oct 6, 2026
685 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants