espressif: add optional ESP-Hosted Wi-Fi on ESP32-P4 - #11502
Open
ladyada-eagleclaw wants to merge 1 commit into
Open
ladyada-eagleclaw wants to merge 1 commit into
ladyada-eagleclaw wants to merge 1 commit into
Conversation
Use remote Wi-Fi components and preserve the configured SDIO transport across VM reloads. Reserve its slot from sdioio allocation. Board wiring remains in the board definition. Co-authored-by: Limor Fried <ladyada@users.noreply.github.com>
This was referenced Oct 3, 2026
Collaborator
|
Metro CI fails with "No SOURCES given to target: __idf_esp-hosted". CI never fetches esp-hosted's nested protobuf-c submodule. Same fix as mbedtls in esp_hosted = TOP / "ports" / "espressif" / "esp-hosted"
if (esp_hosted / ".gitmodules").exists():
depth_maybe = "" if clone_supports_filter else "--depth 1"
run(
"Init esp-hosted nested submodules",
f"git submodule update --init {filter_maybe} {depth_maybe} common/protobuf-c",
cwd=esp_hosted,
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI-assisted with Codex, asked to bring up the Metro ESP32-P4's C6 coprocessor through CircuitPython's standard Wi-Fi APIs. This PR extracts only ESP-Hosted integration from #11497; the Metro wiring is in the separate board PR.
What
Add optional ESP-Hosted Wi-Fi to ESP32-P4 boards.
CIRCUITPY_ESP_HOSTED=1enables the existingwifi,socketpooland SSL implementation with the remote radio; each board provides its SDK transport configuration.Pin ESP-Hosted v2.12.13 and an upstream esp-wifi-remote commit (component 1.6.5), wire them into dependency/build selection, select the remote Wi-Fi headers, initialize Hosted once, and retain the SDIO/control pins across VM reloads. Reserve the Hosted SDMMC slot so
sdioioselects the other slot. Keep dependency selection consistent during automatic CMake regeneration.Dependency
This PR is stacked on #11500 (
fix-sdio-slot-lifetime), which contains the separately reviewed controller/slot cleanup and SDK prerequisites. Its diff contains only the Hosted integration. The unrelated SD frequency-unit correction, USB host, ADC, UID, ROM reset and DSI fixes are separate PRs.Validation
Metro ESP32-P4 Rev A, silicon v0.1, 16 MB flash/PSRAM, with C6 firmware ESP-Hosted 2.12.11. AP scans, connection/DHCP, gateway ping, DNS resolution and HTTP 200 passed. After normal reboot, safe-mode reason was
NONE, gateway ping was 19 ms and the HTTP response wasHTTP/1.1 200 OK.The same integrated firmware passed concurrent SD-card read/write verification and 24 mount/read/unmount/deinit cycles while Wi-Fi scanned, then returned to the USB keyboard/DSI demo. These are serial and hardware observations, not simulated results. Credentials were not added to the source or PR.
Recombining the eight issue-specific changes and the board definition reproduces all 29 affected paths from the tested integration tree byte for byte. That recombined tree builds on current
main(35210c2e31) withmake -C ports/espressif BOARD=adafruit_metro_esp32p4 BUILD=build-metro-p4-c6-final -j6: 1,536,144 bytes used and 561,008 bytes free in the 2 MiB firmware partition. Earlier integrated builds also passed for the other five P4 configurations and an ESP32-S3. This is a combined build with the separately submitted Metro wiring, not a claim of a standalone hardware test of the extracted PR. Changed-file pre-commit andgit diff --checkpass. The C6 firmware was not modified. BLE, ESP-NOW, TLS validation and other coprocessor/transport combinations are not claimed.