← board

ESP-IDF integration: Xtensa (ESP32-S2/S3) — QEMU + real hardware

Motivation

The payoff ticket: PXX-compiled Pascal running on the user's physical ESP32-S2/S3 boards inside an ESP-IDF app — app_main in Pascal, calling vendor APIs (GPIO/UART/delay) through the IDF link. C3/riscv32 ticket proves the pipeline shape; this one adds the windowed-ABI object and real hardware.

Scope

Non-goals

Acceptance

Notes

Hardware flash hand-off (user runs, needs the board on USB)

. ~/esp/esp-idf/export.sh
make -C <repo> compiler/pascal26              # ensure current compiler
cd examples/esp32/hello-s3 && ./build.sh      # build with the live PXX
idf.py -p /dev/ttyUSB0 flash monitor          # adjust port (ttyUSB*/ttyACM*)

Expect: IDF boot banner, PXX hello from Pascal S3: i=1..5, PXX S3 sum 1..5 = 15, then GPIO2 LED toggling on a ~500 ms cadence. Ctrl-] exits the monitor. (Wire an LED+resistor to GPIO2/GND if the board has no on-board LED there.)

CLOSED via triage (2026-06-30)

Harness-achievable scope COMPLETE: ESP-IDF Xtensa QEMU path + GDB windowed-frame backtrace done & re-verified. The sole remaining acceptance item — flashing a physical ESP32-S2/S3 board over USB — is un-automatable in this harness. Closing the QEMU/integration scope; physical-board validation split to [[feature-esp-hardware-flash-validation]].