// the find
nviennot/stm32-emulator
A Rust-based STM32 microcontroller emulator built specifically to run unmodified 3D printer firmware (Elegoo Saturn, Anycubic Mono X) without real hardware. It uses Unicorn for ARM instruction emulation and hooks memory-mapped peripheral registers via SVD files. This is a reverse-engineering tool, not a general-purpose embedded dev environment.
Peripheral coverage is unusually deep for a hobby project: real interrupt handling (NVIC with proper stack switching, floating-point context), DMA, software SPI bit-banging detection, and a live SDL2 display window. The SVD-driven configuration means you can target different STM32 variants without recompiling — just swap the SVD file. Running at ~50MHz (1/3 real speed) is genuinely fast compared to Renode or Qiling, which the README benchmarks fairly and honestly. The tracing output (per-register, per-peripheral, per-instruction) is exactly what you need when reverse-engineering firmware you can't read source for.
Abandoned since September 2022 — the GDB server the author called 'fun to implement' never landed, which is the single feature that would make this useful beyond read-only tracing. The SPI flash setup requires a physical dump from real hardware (the ext-flash.bin), so you can't fully emulate a printer you don't own. Peripheral support is STM32F407-centric; there's no evidence it works on F1 or F4 variants with different peripheral layouts even though the SVD approach suggests it should. No test suite anywhere in the tree, so there's no way to know which peripheral edge cases are actually correct versus approximately-good-enough-for-these-two-firmwares.