Test embedded firmware without hardware.
Run the compiled ELF, HEX, or BIN code you flash to STM32, ESP32, RP2040, nRF52, and custom PCBs in your browser, terminal, or CI pipeline before prototype boards arrive.
Host mocks vs emulators vs digital twins.
Choose the verification layer that matches the bugs you need to catch before shipping hardware.
| Approach | What runs | Peripherals | Custom PCBs | CI behavior |
|---|---|---|---|---|
| Host unit tests (CMock / FFF) | Recompiled C logic on x86/ARM host | Hand-written mocks only | No board or wiring model | Fast, but misses register, DMA, and ISR bugs |
| QEMU | Compiled MCU binary (limited boards) | Sparse peripheral stubs | No PCB import | Commonly stubs missing registers or hangs |
| Renode | Compiled MCU binary | Hand-written C# / Python models | Manual .repl board scripts | Good with Robot Framework once models exist |
| CircuitTwin | Real ELF, HEX, or BIN firmware | Generated from datasheets and SVDs | Imports KiCad, Altium, Eagle, ODB++, IPC-2581 | Native ct CLI, GitHub Action, GitLab CI, MCP |
Zero-hardware GitHub Actions CI.
Compile your firmware, boot it on a deterministic board twin, check UART or bus assertions, and upload JUnit results on every pull request.
Read full CI workflow guide →Every runner executes the same instruction-counted virtual timeline, so tests never flake due to USB cables, stale flash memory, or lab bench contention.
name: Firmware Hardware-Free CI
on: [push, pull_request]
jobs:
simulate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build firmware
run: cmake --preset release && cmake --build --preset release
- name: Install ct CLI
run: curl -fsSL https://circuittwin.ai/install.sh | sh
- name: Run firmware on STM32 digital twin
env:
CT_TOKEN: ${{ secrets.CT_TOKEN }}
run: |
ct run --json --board nucleo-f767zi build/app.elf --until "SELF_TEST_PASS"
ct test suite run tests/ci-suite.yaml --junit reports/junit.xmlCommon questions.
Can I test STM32, ESP32, or RP2040 firmware without a physical dev board?
Yes. Compile your firmware with STM32CubeIDE, Zephyr, ESP-IDF, Pico SDK, PlatformIO, or CMake as usual, then pass the resulting ELF, HEX, or BIN file to CircuitTwin in the browser or with ct run.
Why are host unit tests not enough for embedded firmware?
Host unit tests compile C functions on your laptop with stubbed HAL calls, so they miss clock-gating mistakes, wrong DMA channel setup, interrupt priority bugs, bus timing errors, and stack overflows. Running your real binary on a digital twin catches hardware-level defects before prototypes arrive.
How do I run hardware-free firmware tests in GitHub Actions or GitLab CI?
Install the ct CLI or use the CircuitTwin GitHub Action or GitLab CI/CD component, commit a YAML test suite next to your firmware, and gate every pull request with JUnit XML, JSON reports, and deterministic exit codes.
What if my custom board uses sensors or chips not in the stock catalog?
Import your KiCad, Altium, Eagle, EasyEDA, ODB++, or IPC-2581 board layout and run ct twin generate with the vendor datasheet PDF, reference manual, or SVD file to build a twin for missing parts.
Next steps.
Explore board-specific guides or compare CircuitTwin against existing simulators.