Conversation
Wires the esp32c3 feature through foa, foa_sta, foa_awdl and the examples, and patches esp-wifi-hal and the esp32c3 PAC to the git commits carrying the C3 support. No chip-specific code was needed in FoA itself; all the differences live in esp-wifi-hal. The examples need a riscv rustflags override so rust-lld does not get the -nostartfiles flag from the workspace config. Verified end to end on hardware: sta_single connects to a WPA2 network (scan, auth, assoc, full 4-way handshake, CCMP), gets a DHCP lease, resolves DNS and reaches the internet.
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.
This wires the ESP32-C3 through FoA on top of esp32-open-mac/esp-wifi-hal#22. No chip-specific code was needed in FoA itself: every difference between the S2 and the C3 lives in esp-wifi-hal, so this is only feature plumbing, a linker flag and the
[patch.crates-io]entries that point at the esp-wifi-hal and esp-pacs commits carrying the C3 support (esp-rs/esp-pacs#510 rebased onto the 0.32.3 release). Opened as a draft until those land and get released; the patch section goes away then.esp32c3feature infoa,foa_sta,foa_awdland the examplesexamples/.cargo/config.toml: ariscv32imc-unknown-none-elfrustflags override, because rust-lld rejects the-nostartfilesflag from the workspace config that the Xtensa targets needCargo.toml: git patches foresp-wifi-haland theesp32c3PACTesting.
sta_singlebuilt with--features esp32c3on an ESP32-C3 board connects to a WPA2 network: scan, authentication, association, the full 4-way handshake and CCMP through the hardware key slots, then a DHCP lease from an OpenWrt router (the handshake and lease are visible inhostapdanddnsmasqlogs) and the board answers pings. DNS and outbound traffic were checked as well. Note that boards whose only serial path is the USB-JTAG bridge need esp-println'sjtag-serialfeature to see the log; the examples keep theuartdefault, so I did not change that here.How the port was done. The register map, the driver changes and the hardware verification are described in esp32-open-mac/esp-wifi-hal#22: MMIO reference diffing of the S2 and C3 blobs in Ghidra, targeted decompilation for bit layouts, runtime register dumps against esp-radio for the remaining init bits, and a three-node RF test bench (C3, a laptop in monitor mode, a router as a second monitor). The work was carried out with Claude Fable 5.1 (Anthropic) running in Claude Code under my direction; the model did the analysis, wrote the code and ran the hardware loop, I chose the targets, supplied the setup, reviewed every change and decided what to upstream.