项目的 README,来自 github.com/mikroverk/esp32sim。合并为一个 markdown 文件:README.md。
esp32sim is an ESP32 emulator written in Rust. It runs real ESP32 firmware on your computer or in a browser tab, without the hardware.
It boots the chip's own mask ROM, the real second-stage bootloader and your unmodified application. It also models the board around the chip: displays, touch, LEDs, buttons, audio, camera and WiFi.
Try it in your browser, nothing to install: https://mikroverk.github.io/esp32sim/
--chip esp32 --board ai-thinker-cam --cam-image image.ppm supplies the AI-Thinker
ESP32-CAM's OV2640 with a BMP/PPM still image. Capture supports raw RGB565/YUV422
into internal DRAM at a fixed approximate 10 FPS; the usual JPEG+PSRAM
CameraWebServer path is unsupported. See the camera scope and example.
| Chip | CPU | Status | Boards |
|---|---|---|---|
| ESP32-S3 | 2 x Xtensa LX7 | mature | Atech 14-port kit, Waveshare Touch-LCD-4B, Touch-AMOLED-1.8, ESP32-S3-CAM |
| ESP32-C3 | RISC-V RV32IMC | draft | console only |
| ESP32-C6 | RISC-V RV32IMAC | draft | Waveshare ESP32-C6-LCD-1.47 (with the 802.15.4 radio), Seeed XIAO ESP32-C6 |
| ESP32 (classic) | 2 x Xtensa LX6 | early | LilyGO TTGO T-Display, ESP32-2432S028 "Cheap Yellow Display", AI-Thinker ESP32-CAM (raw capture), Ulanzi TC001 |
| ESP32-P4 (rev < 3 and rev ≥ 3) | 2 x RISC-V RV32IMAFC | draft | Waveshare ESP32-P4-WIFI6-Touch-LCD-3.5 (rev ≥ 3); WiFi through an emulated ESP32-C6 co-processor on SDIO (ESP-Hosted) |
| ESP32-S31 | 2 x RISC-V RV32IMAFC | draft | Espressif ESP-Mosaico (display, touch, WiFi, audio, IMU, keys); IDF v6.1 |
These run on the demo site:
You can also load your own firmware for any of the chips.
No Rust needed: the releases carry prebuilt binaries for macOS and Linux, and docs/quick-start.md takes your own build from the tarball to a run in three steps. From a checkout:
cargo build --release
tools/fetch-demo-assets.sh --no-linux # downloads the mask ROMs, which are not in the repo
FW=web/wasm/fw/public # demo firmware included in the repo
./target/release/esp32sim --boot rom --rom web/wasm/fw/esp32s3_rev0_rom.elf \
--bootloader $FW/atech-bootloader.bin --ptable $FW/atech-ptable.bin --app $FW/atech-firmware.bin \
--script $FW/atech-script1.txt --wav out.wav --tft-png tft.png --max-seconds 5
This boots the Atech synth firmware, plays a short script, and saves the audio to out.wav and
the display to tft.png. Use esp32sim-c3, esp32sim-c6, esp32sim-p4, esp32sim-s31 or --chip esp32 for the other chips.
Getting started covers the rest: your own ESP-IDF builds, each chip, WiFi, scripts, the browser build and debugging.
Bug fixes, peripherals, boards and new chips are welcome. CONTRIBUTING.md lists what a pull request needs; these are the same checks CI runs. Security problems go through SECURITY.md, not the public issue tracker.
esp32sim is released under the MIT License.
Authors: Joakim Eriksson, RISE (@joakimeriksson), Alice (@aliceisjustplaying) and Mattia Fiumara, Schematik (@mfiumara), together with other contributors.
The emulator was written from the ESP-IDF register headers, the Xtensa core configuration that ships with ESP-IDF, the RISC-V specification, the chips' technical reference manuals and observed firmware behaviour. QEMU was consulted only to confirm instruction semantics; no code was copied.
esp32sim is unofficial and not affiliated with Espressif Systems.
Third-party code, data and demo files keep their own licenses:
web/wasm/fw/public/ with pocket-tank-LICENSE.txt;
its model is downloaded.tools/fetch-micropython.sh and not in the repo. The demo's app and filesystem are in
examples/ttgo-tdisplay, with Russ Hughes's st7789py driver and fonts (MIT); the notice is in
web/wasm/fw/public/tdisplay-NOTICE.txt.esp-periph/src/sar_adc.rs; see esp-periph/LICENSE-ADC.