RTOS & Firmware Stacks
Apache NuttX RTOS boot and driver CI
Execute real Apache NuttX nuttx ELFs in CI to verify NSH startup, POSIX /dev sensor drivers and board pinmux changes.
NuttX sim builds run on Linux host threads and skip STM32/RP2040 board bring-up, GPIO alternate functions and SPI/I2C character drivers.
Running the cross-compiled nuttx ELF on CircuitTwin boots into NSH over virtual UART, mounts virtual I2C/SPI devices under /dev, and verifies driver ioctl error paths deterministically.
NuttX subsystems tested on twins
| NuttX subsystem | Verification target | Regression caught |
|---|---|---|
NSH console | Serial login prompt nsh> | Broken up_earlyserialinit() or clock prescaler |
/dev/i2c0 & /dev/spi0 | Sensor register probing | Wrong Kconfig pin alternate function or bus speed |
OSTest | POSIX pthread/sem/timer kernel suite | SysTick or PendSV priority misconfiguration |
Local CLI workflow
Shell - run NuttX ELF on STM32F4 twin
ct run --json --board stm32f4-discovery --timeout-ms 4000 nuttxSuite & fault configuration
tests/nuttx.suite.yaml
version: 1
board: stm32f4-discovery
firmware: nuttx
tests:
- name: nsh-boot-and-sensor-probe
timeout_ms: 4000
expect:
console_contains: "nsh>"
exit_code: 0CI pipeline integration
.github/workflows/nuttx-ci.yml
name: Apache NuttX Twin CI
on: [push, pull_request]
jobs:
nuttx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: make -j
- uses: circuittwin/action@v1
with:
suite: tests/nuttx.suite.yamlTroubleshooting checklist
| Symptom | Fix |
|---|---|
| Boot stops before nsh> prompt | Check CONFIG_STM32_USART2_SERIAL_CONSOLE and HSE crystal frequency in board.h. |
| Exit code 4 on unmodelled USB/OTG init | Disable unused USB console in defconfig or isolate serial console tests. |
Frequently asked questions
| Question | Answer |
|---|---|
| Does CircuitTwin run PX4 NuttX binaries as well as upstream Apache NuttX? | Yes. Both upstream Apache NuttX and PX4 NuttX ELF builds run directly on supported STM32, RP2040 and ESP32 board twins. |