Repository navigation
fix(esp32p4): route Serial to USB-Serial-JTAG so AutoResearch RPC works - #2620
Conversation
The ESP32-P4 build was using the platform default `CDC On Boot: 0`, which maps the Arduino `Serial` object to UART0 (pins 37/38). The host tool (`fbuild monitor` / `serial_interface.py`) opens the USB-Serial-JTAG COM port, so every RPC write hit a "Write timeout" — blocking `testSimd`, `testSimdBenchmark`, `wave8ExpandBenchmark`, `parlioEncodeBenchmark`, and forcing the `esp_rom_printf` workaround for boot-time benchmarks. Add `ARDUINO_USB_MODE=1` + `ARDUINO_USB_CDC_ON_BOOT=1` to the ESP32_P4 board definition so `HardwareSerial` is wired to `HWCDCSerial` on the USB-Serial-JTAG peripheral, matching the COM port the host tool talks to. Closes #2541 Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughESP32_P4 board configuration in ChangesESP32_P4 USB CDC Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…C-only) (#2624) Follow-up to #2618. The SIMD validation suite, Wave8 expansion bench, and PARLIO encode bench are now invoked exclusively via their RPC handlers (`testSimd`, `wave8ExpandBenchmark`, `parlioEncodeBenchmark` — all registered in AutoResearchRemote.cpp). Drop the `#ifdef FL_RUN_SIMD_TESTS_AT_BOOT` / `FL_BENCH_WAVE8_AT_BOOT` / `FL_BENCH_PARLIO_AT_BOOT` invocation blocks from AutoResearch.ino's setup() — keeping these as opt-in "bridge" macros leaves scaffolding that future edits quietly reactivate, defeating the move off the boot path. Update the file-level doc comments in AutoResearchWave8Expand.h and AutoResearchParlioEncode.h to reflect RPC-only invocation. If RPC routing is broken on a platform (e.g. ESP32-P4 Serial misroute fixed in #2620), the correct response is to fix the routing — not to re-introduce a boot-time bridge. Co-authored-by: Claude Opus 4.7 <[email protected]>
Summary
ARDUINO_USB_MODE=1andARDUINO_USB_CDC_ON_BOOT=1to theESP32_P4board definition inci/boards.pySerialtoHWCDCSerialon the USB-Serial-JTAG peripheral, matching the COM port the host tools (fbuild monitor/serial_interface.py) openbash autoresearch esp32p4 --simd—testSimd,testSimdBenchmark,wave8ExpandBenchmark,parlioEncodeBenchmarkCloses #2541.
Why
With
CDC On Boot: 0the firmware was listening on UART0 (pins 37/38) while the host wrote to the USB-Serial-JTAG COM port. Every RPC died withWrite timeout. The companionesp_rom_printfboot-time workaround was the only way to capture measurements.Test plan
bash autoresearch esp32p4 --simd --no-fbuild— expecttestSimdJSON, not write timeoutCDC On Boot: 1measureParlioreturns full encode_us results (unblocks perf(autoresearch): use FL_PRINT instead of esp_rom_printf in on-device benchmarks #2540 FL_PRINT migration)Unblocks #2540 once verified on hardware.
🤖 Generated with Claude Code
Summary by CodeRabbit