rust-threadx-demos
These demos use ThreadX as a Rust standard library implementation. They work in / on
- QEMU
- a Teensy 4.0
- an iMXRT1170EVK
Right now, most apps blink LEDs and / or print "hello world!".
The iMXRT1170EVK can demonstrate a basic UDP loopback, and you can ping this board.
These demos are for my RustConf 2026 talk!
Getting started
You'll need a custom toolchain to build these examples.
Here is how to build that toolchain.
All commands below assume your toolchain keeps the stage1 name.
QEMU
Install qemu-system-arm for your host.
Then, run the example:
cargo +stage1 --config .cargo/qemu.toml run --release --package=rust-threadx-qemu
QEMU's stdio uses semihosting for input and output.
Teensy 4.0
You'll need a Teensy 4.0 board.
Install the dependencies discussed in the teensy4-rs project, including the command-line teensy_loader_cli.
Also, install the teensy4-runner.
Run the following to compile the example, convert it to Intel HEX, and attempt board programming:
cargo +stage1 --config .cargo/teensy4.toml run --release --package=rust-threadx-teensy4
Once running on your board, you should see the LED blinking. Connect to the USB serial interface to see the welcome message. The board's stdio uses USB serial for stdout; stdin is not (yet) implemented.
iMXRT1170EVK
You'll need the board, a recent build of probe-rs, and a way to connect to the board's Ethernet network.
Connect your development host to the 100M ENET interface.
The board thinks its IP address is 192.168.5.1.
Assign your host an address on that /24 network.
Run the following to compile and flash the example:
cargo +stage1 --config .cargo/imxrt1170evk.toml run --release --package=rust-threadx-imxrt1170evk
You should see the LED blinking. The board's stdio uses semihosting for input and output; probe-rs should automatically detect this.
If you ping the board, it responds.
Connect to the UDP loopback port 5678 and talk with yourself:
printf 'hello world' | nc -u -w1 192.168.5.1 5678
