Skip to content

Commit b6466e7

Browse files
WaylandYangclaude
andauthored
docs: ESP32-S3 (T-Panel) runtime-validated over native USB (#7)
DCP firmware now runs on a second physical board. The lamp example flashed to a LILYGO T-Panel S3 and passed all 13 round-trip cases (tools/test_uart_roundtrip.py) over the S3's native USB-Serial/JTAG interface — no CH340-class USB-UART bridge chip in the path. This adds a second runtime-validated target alongside ESP32-WROOM-32, and a second ISA generation (Xtensa LX7 vs LX6). It also exercises DCP over a native-USB CDC link for the first time: same firmware, no transport-specific code, FQBN options USBMode=hwcdc + CDCOnBoot=cdc route the Arduino `Serial` to the USB-Serial/JTAG controller. S3 build footprint: 322 KB flash / 22.7 KB globals (PSRAM disabled, which is the safe bring-up config — the lamp example does not need PSRAM, so this avoids any QSPI-vs-OPI boot-loop risk). Changes: - README "Validated on real hardware": now states two boards; adds the native-USB detail - README cross-compile matrix: ESP32-S3 row added with runtime ✓ - README roadmap bullet updated - docs/paper/main.tex §validation: two-board statement + S3 added to the portability footprint list Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6adb88d commit b6466e7

2 files changed

Lines changed: 30 additions & 18 deletions

File tree

README.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,20 @@ device boundary.
7373

7474
## Validated on real hardware
7575

76-
As of v0.3 the reference firmware is **measured-validated on an
77-
ESP32-WROOM-32 dev board** over CH340 USB-Serial at 115 200 baud:
76+
As of v0.3 the reference firmware is **measured-validated on two
77+
physical boards** — an ESP32-WROOM-32 dev board over CH340 USB-Serial,
78+
and an ESP32-S3 (LILYGO T-Panel S3) over the S3's native USB-Serial/JTAG
79+
— both at 115 200 baud:
7880

79-
- 13/13 round-trip tests pass (`tools/test_uart_roundtrip.py`)
81+
- 13/13 round-trip tests pass on each board (`tools/test_uart_roundtrip.py`)
8082
- 88/88 Python unit & conformance tests pass
81-
- Compiled firmware: 294 KB flash, 22.7 KB globals (Arduino-ESP32 core 3.3.8)
83+
- Compiled firmware: 294 KB flash, 22.7 KB globals on WROOM-32;
84+
322 KB / 22.7 KB on the S3 (Arduino-ESP32 core 3.3.8)
8285
- The pure DCP layer is approximately 14 KB over a baseline empty
8386
sketch (measurement script in `docs/paper/figures/`)
87+
- The S3 run also exercises DCP over a native-USB CDC link rather
88+
than a USB-UART bridge chip — same firmware, no transport-specific
89+
code
8490

8591
![Memory footprint: DCP target vs IoT-MCP measured vs Direct MCP vs Matter](docs/paper/figures/footprint.png)
8692

@@ -95,12 +101,14 @@ validation does and does not prove.
95101

96102
The reference firmware is portable by design (Arduino `Stream` + a
97103
software SHA-256, no SoC-specific code paths in `DCP.{h,cpp}`). It
98-
cross-compiles for every current ESP32 variant *and* for ESP8266,
99-
with end-to-end UART validation pending boards on the bench:
104+
cross-compiles for every current ESP32 variant *and* for ESP8266;
105+
two of those targets are also runtime-validated on real boards, the
106+
rest are build-validated pending hardware on the bench:
100107

101108
| Target | ISA | Flash (lamp+blink) | Globals | Status |
102109
|-------------------|-----------------------|--------------------|----------|---------------|
103110
| ESP32-WROOM-32 | Xtensa LX6 (baseline) | 294 KB | 22.7 KB | runtime ✓ |
111+
| ESP32-S3 (T-Panel)| Xtensa LX7 | 322 KB | 22.7 KB | runtime ✓ (native USB) |
104112
| ESP32-C3 | RV32IMC | 289 KB | 13.4 KB | builds ✓ |
105113
| ESP32-C6 | RV32IMAC + HW-crypto | 266 KB | 14.0 KB | builds ✓ |
106114
| ESP32-H2 | RV32IMAC + 802.15.4 | 292 KB | 14.0 KB | builds ✓ |
@@ -294,7 +302,8 @@ MIT.
294302
- [x] Conformance test suite (golden frames, language-neutral YAML)
295303
- [x] Codegen `--stubs`: emits handler signatures + binding table
296304
- [x] Quickstart video script ([docs/QUICKSTART_VIDEO.md](docs/QUICKSTART_VIDEO.md))
297-
- [x] Real-hardware UART validation (ESP32-WROOM-32, 13/13 round-trips)
305+
- [x] Real-hardware validation on two boards (ESP32-WROOM-32 over
306+
CH340, ESP32-S3 / T-Panel over native USB), 13/13 round-trips each
298307
- [x] Cross-compile clean on ESP32 RISC-V family (C3, C6, H2, P4) and ESP8266
299308
- [x] Public repo at `device-context-protocol/dcp` (v0.3.0 released)
300309
- [x] PyPI release (`pip install pydcp`)

docs/paper/main.tex

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -465,22 +465,25 @@ \subsection{ESP32 reference firmware}
465465
thirteen round-trip cases (\texttt{tools/test\_uart\_roundtrip.py}) covering
466466
calls, reads, dry-run, range rejection, unknown-intent error frames, and a
467467
non-idempotent intent with a \texttt{duration} parameter that exercises
468-
the firmware-side CBOR float decode path. All thirteen cases pass against
469-
real hardware.
468+
the firmware-side CBOR float decode path. All thirteen cases pass on two
469+
physical boards: an ESP32-WROOM-32 over a CH340 USB-UART bridge, and an
470+
ESP32-S3 (LILYGO T-Panel S3) over the S3's native USB-Serial/JTAG
471+
interface. The latter exercises DCP over a native-USB CDC link with no
472+
USB-UART bridge chip and no transport-specific firmware changes.
470473

471474
\paragraph{Portability across the ESP family.} The same
472475
\texttt{firmware/esp32/} library compiles unchanged across the
473476
current ESP32 family --- C3 (RV32IMC, 289\,KB / 13.4\,KB), C6
474477
(RV32IMAC, 266\,KB / 14.0\,KB), H2 (RV32IMAC + 802.15.4, 292\,KB /
475-
14.0\,KB), and P4 (RV32IMAFC dual-core, 326\,KB / 22.0\,KB) --- and
476-
additionally on the legacy ESP8266 NodeMCU (Xtensa LX106, 242\,KB /
477-
28.9\,KB), where the lamp example sketch picks the PWM API at
478-
compile time (\texttt{ledcAttach}/\texttt{ledcWrite} on ESP32,
479-
\texttt{analogWrite} on ESP8266) while the protocol layer itself
480-
remains \texttt{\#ifdef}-free. End-to-end UART validation on these
481-
non-Xtensa-LX6 targets is pending bench availability, but the build
482-
artefacts confirm the portability claim beyond the single target on
483-
which the runtime was measured.
478+
14.0\,KB), P4 (RV32IMAFC dual-core, 326\,KB / 22.0\,KB), and S3
479+
(Xtensa LX7, 322\,KB / 22.7\,KB) --- and additionally on the legacy
480+
ESP8266 NodeMCU (Xtensa LX106, 242\,KB / 28.9\,KB), where the lamp
481+
example sketch picks the PWM API at compile time
482+
(\texttt{ledcAttach}/\texttt{ledcWrite} on ESP32, \texttt{analogWrite}
483+
on ESP8266) while the protocol layer itself remains
484+
\texttt{\#ifdef}-free. Of these, the WROOM-32 and S3 targets are
485+
runtime-validated as described above; the remaining targets are
486+
build-validated, with bench validation pending hardware availability.
484487

485488
\subsection{Conformance suite}
486489

0 commit comments

Comments
 (0)