RTOS & Firmware Stacks
Eclipse ThreadX deterministic RTOS CI
Verify ThreadX preemption-threshold scheduling, byte pools and STM32/NXP peripheral drivers without a hardware rack.
Eclipse ThreadX is standard across STM32U5, STM32H7 and Renesas RA projects. Host Linux ports skip PendSV context switching, NVIC interrupt nesting and hardware timer tick accuracy.
Running your compiled ThreadX ELF on CircuitTwin exercises _tx_initialize_low_level, real Cortex-M33/M7 exception frames and deterministic sensor error injection on every pull request.
ThreadX CI checks
| Component | Behavior checked | Common regression |
|---|---|---|
tx_initialize_low_level | SysTick/PendSV vectors and RAM pool start | Linker symbol __RAM_segment_used_end__ overlapping stack |
Priority inheritance | TX_INHERIT mutex under contention | Deadlock when high-priority sensor task blocks |
Event flags & queues | ISR-to-thread signaling | Missing tx_thread_interrupt_control around shared state |
Local CLI workflow
Shell - run ThreadX ELF on STM32U5 twin
ct run --json --board b-u585i-iot02a build/threadx_app.elfSuite & fault configuration
tests/threadx.suite.yaml
version: 1
board: b-u585i-iot02a
firmware: build/threadx_app.elf
tests:
- name: threadx-sensor-queue-and-nack
timeout_ms: 3000
faults:
- at_ms: 250
bus: I2C2
kind: nack
address: 0x6A
count: 3
expect:
console_contains: "TX_APP_HEALTHY"
exit_code: 0CI pipeline integration
.github/workflows/threadx-ci.yml
name: Eclipse ThreadX Twin CI
on: [push, pull_request]
jobs:
threadx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cmake --build build
- uses: circuittwin/action@v1
with:
suite: tests/threadx.suite.yamlTroubleshooting checklist
| Symptom | Fix |
|---|---|
| Crash immediately after tx_kernel_enter() | Verify PendSV_Handler and SysTick_Handler link to ThreadX assembly handlers rather than CubeHAL stubs. |
| Byte pool allocation fails at runtime | Inspect TX_BYTE_POOL size and unused RAM boundary in the linker map file. |
Frequently asked questions
| Question | Answer |
|---|---|
| Does CircuitTwin support STM32U5 and STM32H7 ThreadX binaries? | Yes. Both B-U585I-IOT02A (STM32U585 Cortex-M33) and NUCLEO-H743ZI2 (STM32H743 Cortex-M7) run ThreadX ELFs natively. |