Repository navigation
Description
Summary
fbuild test-emu --emulator qemu currently supports ESP32 and ESP32-S3 only (xtensa). ESP32-C3 (RISC-V) is rejected by select_runner. This blocks downstream consumers (FastLED's CI has an esp32c3 QEMU test) from migrating off Docker-based QEMU orchestration.
Requested change
Extend the QEMU runner to support ESP32-C3 via qemu-system-riscv32. Ideally same pattern for C6 / H2 since they're also RISC-V.
What works as a reference
FastLED's current (Docker-based) qemu_docker_template.yml successfully invokes:
qemu-system-riscv32 -nographic -machine esp32c3 \
-drive file=/tmp/flash.bin,if=mtd,format=raw \
-global driver=timer.esp32c3.timg,property=wdt_disable,value=true \
-monitor none -serial mon:stdio
inside the espressif/idf:latest image. The binary lives at /opt/esp/tools/qemu-riscv32/esp_develop_9.2.2_20250817/qemu/bin/qemu-system-riscv32 in that image — which suggests Espressif already ships qemu-system-riscv32 alongside qemu-system-xtensa in the same tooling bundle that fbuild auto-downloads for xtensa today.
Suggested implementation sketch
crates/fbuild-daemon/src/handlers/emulator.rs:select_runner()for Espressif32 platform should branch on chip — xtensa binary for esp32/esp32s3, riscv32 binary for esp32c3 (and c6/h2 if the download bundle already has them).deploy_qemu(): use the right-machinestring per chip (esp32c3,esp32c6,esp32h2).- Firmware artifacts are the same:
firmware.bin,bootloader.bin,partitions.bin,firmware.elf. Merged-bin assembly logic should be chip-agnostic. - DIO flash mode requirement likely carries over for C3 — worth verifying with Espressif's QEMU docs.
Acceptance
fbuild test-emu --emulator qemu \
--environment esp32c3 \
--halt-on-success "Starting loop iteration 2" \
--halt-on-error "Guru Meditation|abort\(\)" \
--timeout 60 \
examples/BlinkParallel
completes green on a FastLED esp32c3 project.
Context
- FastLED repo: https://github.com/FastLED/FastLED
- FastLED PR tracking the migration: will reference once opened
- Three FastLED workflows affected:
qemu_esp32c3_test.yml,qemu_esp32s3_test.yml,qemu_esp32dev_test.yml
Filed from an agent working on the FastLED CI migration.
Activity
feat(test-emu): add ESP32-C3 RISC-V QEMU support (#85)
feat(ci): migrate AVR8JS + QEMU emulation workflows to fbuild test-emu