Robust IoT development with Rust and RIOT-OS.
/
Makefile
crates/
mcu-emu .... emulator runner (`qemu-system-xtensa` or RIOT `native` board binary)
examples/
esp32-no_std .... bare `no_std` firmware with a minimal Rust module 'librustmod.a'
xbd-base .... cross-`BOARD` (i.e. native/esp32) firmware for 'librustmod.a' demo
xbd-psa .... cross-`BOARD` firmware for PSA demo
xbd-py .... cross-`BOARD` firmware featuring MicroPython with a RFC8995 module 'libvoucher.a'
xbd-net .... cross-`BOARD` firmware to test/develop networking protocols
...
Ubuntu 20.04 is supported and also being used for CI.
After cloning the repo, first, set up the pre-configured RIOT/ESP32 toolchain:
$ make init
examples/esp32-no_std
A bare no_std
ESP32 firmware with a minimal Rust module. Use make run
to (build and) run the firmware. To exit the qemu-system-xtensa
based runner, type Ctrl-a x
.
$ make run
Upon running the firmware, a binary file called 'riot.esp32.bin' is generated. For test on the real ESP32 device, you can flash this image onto the device by following the Espressif's manual.
examples/xbd-base
A cross-BOARD
firmware with a demo Rust module featuring the "semi_std
" support (println!()
, vec::*
, Box
, core2::io::*
, etc.). This example would be a convenient template for you to start developing a new RIOT-OS firmware in Rust.
Use make run-native
(or make run
as default) to run it as RIOT native
firmware; or use make run-esp32
for ESP32.
$ make run-native
$ make run-esp32
examples/xbd-py
This example demonstrates a cross-BOARD
firmware running the MicroPython interpretor. After bootstraping, a Rust module called 'libvoucher.a' (which implements the RFC8995 Constrained Voucher) is loaded as Python module, and then its APIs are batch-tested.
$ make run-native
--snip--
Type "help()" for more information.
>>> ^C
native: exiting
$ make run-esp32
--snip--
>>> Quiting qemu...