STM32 Simulator Online & CLI

STM32 simulator online and in CI without a dev board.

Run STM32F103, STM32F407, STM32F767, STM32H7, and G4 binaries from STM32CubeIDE, Zephyr, or PlatformIO in the browser or with the ct CLI, catch clock-gating and DMA bugs, and automate CI.

1. Install the ct CLI and sign in

Running firmware on catalog STM32 boards is free. Install the native binary for your operating system and authenticate once.

macOS and Linux
curl -fsSL https://circuittwin.ai/install.sh | sh
Windows PowerShell
irm https://circuittwin.ai/install.ps1 | iex
Sign in
ct login

2. Run your STM32 ELF binary

Pass the same .elf your Makefile, CMake, Zephyr, or STM32CubeIDE build outputs. Add --json for structured output or --until to stop as soon as your pass marker prints on UART.

terminal
ct run --board nucleo-f767zi build/app.elf --until "READY"
ct run --json --board stm32f4-discovery build/stm32f407.elf --record trace-out/

Every run prints a clear verdict and returns a stable exit code: 0 pass, 1 fail, 2 invalid input, 3 platform error, or 4 inconclusive (when code touches an unmodelled register).

3. Catch real STM32 peripheral bugs

Unlike emulators that silently ignore missing RCC clock-enable bits or return zero from unimplemented peripherals, CircuitTwin enforces real register behavior:

  • Clock gating: Writing to GPIO, TIM, SPI, or DMA registers before enabling the matching RCC_AHB1ENR or RCC_APB1ENR bit fails just like silicon.
  • PLL and baud checks: Misconfigured PLLM/PLLN/PLLP dividers or wrong USART_BRR divisors surface immediately in virtual time.
  • Record and reverse-debug: Inspect trace-out/isr.jsonl, races.jsonl, and signals.vcd, or attach GDB with reverse-step to walk straight back to the bad register write.

4. Or let Claude Code / Cursor drive STM32 tests via MCP

Skip the local download if you want your AI coding agent to build and test STM32 firmware directly over OAuth Streamable HTTP:

Claude Code
claude mcp add --transport http circuittwin https://app.circuittwin.ai/mcp

Silicon verification on NUCLEO-F767ZI

We test STM32 twins against physical silicon on our bench. On NUCLEO-F767ZI (STM32F767ZI revision Z), 45 of 49 checked features matched real hardware, 4 had documented differences, 0 had unexpected diffs, and 111 of 111 negative controls rejected planted bugs as expected. Full JSON records live on the Accuracy report.

Frequently asked questions

Is there an STM32 simulator online for STM32F4, STM32F7, STM32H7, and G4?

Yes. CircuitTwin runs STM32F103, STM32F407, STM32F411, STM32F446, STM32F767 (NUCLEO-F767ZI), STM32H743, STM32G4, STM32L4, and STM32U5 binaries in the browser and via the native ct CLI. You can also generate a new STM32 part twin from its ST datasheet and reference manual.

How is CircuitTwin a Wokwi alternative for STM32?

Wokwi covers three entry-level STM32 parts (C031, L031, F103C8) with manual diagram.json wiring. CircuitTwin adds STM32F4, F7, H7, G4, L4, and U5 families, imports KiCad and Altium PCBs directly, wires multi-board CAN/SPI/I2C/UART systems, and runs deterministic CI fault matrices.

Do I have to recompile my STM32CubeIDE, Zephyr, or PlatformIO project for simulation?

No. Run the real arm-none-eabi-gcc, STM32CubeIDE, Zephyr, or PlatformIO ELF or HEX binary you flash to silicon with ST-Link.

Can I attach GDB from VS Code or STM32CubeIDE?

Yes. Run ct debug to start a local GDB server supporting breakpoints, watchpoints, SWO/ITM, RTT, RTOS thread inspection, and reverse-step / reverse-continue.

How does CircuitTwin compare to QEMU and Renode on STM32?

On our public 43-ELF STM32F407 benchmark, CircuitTwin caught 24 of 26 seeded firmware bugs and passed all 17 of 17 working builds. Renode passed 15 of 17 working builds (12/26 bugs caught) and QEMU passed 10 of 17 working builds (19/26 raw, 8 distinct).