RTOS & Firmware Stacks
PlatformIO headless firmware CI without hardware
Point suite.yaml straight at .pio/build/<env>/firmware.elf and run deterministic sensor and bus fault tests in CI.
PlatformIO builds cleanly across dozens of embedded frameworks (Arduino, STM32Cube, ESP-IDF, Zephyr), yet pio test -e native only checks pure host logic without real peripherals.
By running .pio/build/<env>/firmware.elf on CircuitTwin, you keep your exact platformio.ini environments while testing real I2C, SPI, UART and CAN drivers headlessly.
PlatformIO environment to CircuitTwin mapping
| platformio.ini board | ELF output path | CircuitTwin board slug |
|---|---|---|
nucleo_f446re | .pio/build/nucleo_f446re/firmware.elf | nucleo-f446re |
esp32-c3-devkitm-1 | .pio/build/esp32c3/firmware.elf | esp32c3-devkitm |
megaatmega2560 | .pio/build/mega2560/firmware.elf | arduino-mega2560 |
teensy41 | .pio/build/teensy41/firmware.elf | teensy-4-1 |
Local CLI workflow
Shell - build with PlatformIO and execute twin suite
pio run -e nucleo_f446re
ct test run --json --junit results/pio.xml tests/pio-f446.suite.yamlSuite & fault configuration
tests/pio-f446.suite.yaml
version: 1
board: nucleo-f446re
firmware: .pio/build/nucleo_f446re/firmware.elf
tests:
- name: pio-sensor-smoke
timeout_ms: 2500
expect:
console_contains: "BOOT_READY"
exit_code: 0CI pipeline integration
.github/workflows/platformio-twin-ci.yml
name: PlatformIO Twin CI
on: [push, pull_request]
jobs:
pio:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pip install platformio && pio run -e nucleo_f446re
- uses: circuittwin/action@v1
with:
suite: tests/pio-f446.suite.yamlTroubleshooting checklist
| Symptom | Fix |
|---|---|
| PlatformIO only outputs firmware.bin or firmware.hex | PlatformIO always emits firmware.elf inside .pio/build/<env>/ right beside .bin/.hex. |
| Symbols missing during ct debug GDB sessions | Add build_type = debug or build_flags = -g3 in platformio.ini for source-line debugging. |
Frequently asked questions
| Question | Answer |
|---|---|
| Does PlatformIO require any special library to run on CircuitTwin? | No. Build your normal PlatformIO environment and point CircuitTwin at .pio/build/<env>/firmware.elf. |