Documentation
// xtensa

ESP32 Emulation (Xtensa)

ESP32 and ESP32-S3 boards use an Xtensa LX6 / LX7 architecture. Because no production-quality Xtensa emulator is available as pure JavaScript, Eidolon uses a QEMU-based backend for these boards, the lcgamboa fork with libqemu-xtensa, compiled to a native binary and served by the Rust backend.

Note: This section applies to ESP32, ESP32-S3 (Xtensa) and ESP32-C3 (RISC-V) - they all share the same QEMU lcgamboa pipeline, just with different libqemu binaries and machine targets. See RISC-V Emulation (ESP32-C3) for the C3-specific differences.

How It Works

  1. Arduino sketch is compiled by arduino-cli to an ESP32 .bin flash image.
  2. Frontend sends the binary to the backend via WebSocket (Esp32Bridge).
  3. Backend spawns a QEMU process with the lcgamboa Xtensa plugin, loads the image.
  4. GPIO and UART events are forwarded over the WebSocket back to the browser.
  5. Frontend updates component states (LEDs, display, etc.) in real time.

Supported Boards

BoardCPUEmulation
ESP32Xtensa LX6 dual-core @ 240 MHzQEMU (lcgamboa)
ESP32-S3Xtensa LX7 dual-core @ 240 MHzQEMU (lcgamboa)

Peripheral Support

  • GPIO: digital output / input, LED control
  • UART: Serial Monitor via Serial.print()
  • I2C / SPI: peripheral communication
  • RMT / NeoPixel: addressable LED strips
  • LEDC / PWM: hardware PWM channels
  • WiFi: partial (connection events forwarded)

Requirements

QEMU-based emulation requires the Eidolon backend to be running. This means it works with the hosted version at velxio.dev and with Docker self-hosting, but not in a pure static frontend deployment.

Full details: docs/ESP32_EMULATION.md in the repository.