velxio/test/esp32-emulator
David Montero Crespo b166b8de37 feat: add ESP32 lcgamboa test suite, sketches and firmware binaries
- test/esp32/test_esp32_lib_bridge.py: 28-test suite for ESP32 emulation
  via libqemu-xtensa.dll (GPIO, UART, ADC, pinmap, DLL symbols, manager API)
- test/esp32/test_arduino_esp32_integration.py: 13-test integration suite
  simulating Arduino Uno ↔ ESP32 serial communication (LED_ON/OFF, PING/PONG,
  GPIO transitions, rapid burst, unknown command resilience)
- sketches/blink_lcgamboa/: IRAM/DRAM-safe blink firmware (5× GPIO2 toggle)
- sketches/serial_led/: ESP32 firmware responding to serial commands over UART0
- sketches/arduino_serial_controller/: Arduino Uno sketch for serial LED control
- sketches/blink_qemu.ino: reference blink sketch for stock QEMU
- binaries_lcgamboa/: pre-compiled 4 MB merged flash images for QEMU
  (blink_lcgamboa + serial_led, arduino-esp32 2.0.17 + FlashMode=dio)
- .gitignore: exclude DLL/ROM binaries (too large) and .elf/.map build artifacts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 12:28:40 -03:00
..
binaries feat: add ESP32 emulator with QEMU WebAssembly integration and basic GPIO functionality tests 2026-03-10 18:01:05 -03:00
binaries_lcgamboa feat: add ESP32 lcgamboa test suite, sketches and firmware binaries 2026-03-14 12:28:40 -03:00
qemu-wasm feat: add ESP32 emulator with QEMU WebAssembly integration and basic GPIO functionality tests 2026-03-10 18:01:05 -03:00
sketches feat: add ESP32 lcgamboa test suite, sketches and firmware binaries 2026-03-14 12:28:40 -03:00
web feat: add ESP32 emulator with QEMU WebAssembly integration and basic GPIO functionality tests 2026-03-10 18:01:05 -03:00
README.md feat: add ESP32 emulator with QEMU WebAssembly integration and basic GPIO functionality tests 2026-03-10 18:01:05 -03:00

README.md

ESP32 Emulation Test Suite

This directory contains tests for ESP32 emulation using QEMU compiled to WebAssembly.

Structure

  • sketches/ - Arduino sketches for ESP32 (copied from test/esp32/sketches)
  • binaries/ - Compiled firmware binaries (.bin, .elf)
  • qemu-config/ - QEMU machine configurations
  • scripts/ - Build and test scripts
  • web/ - HTML/JS wrapper for WebAssembly QEMU

Prerequisites

  1. QEMU fork built as WebAssembly (see wokwi-libs/qemu-lcgamboa/)
  2. ESP32 toolchain (arduino-cli with esp32 platform)
  3. Emscripten SDK (for building QEMU to WASM)

Initial Test

The first test is to compile the blink sketch and run it in QEMU (native) to verify basic GPIO emulation.

Goals

  • Emulate GPIO pins (digitalWrite, digitalRead)
  • Emulate Serial output (UART)
  • Emulate WiFi (station and AP modes)
  • Emulate other peripherals (SPI, I2C, ADC, etc.)
  • Run entirely in browser via WebAssembly