A Rust wrapper for FreeRTOS. Beta Rust is required - soon to be stable.
The main entry point for your embedded executable should be provided by your platform's preffered compiler toolchain. For example, for STM microcontrollers, a project generated using STM32CubeMX and compiled using GCC could be used as a starting point. Additional shims between C and Rust provide access to drivers, hardware and FreeRTOS.
This library uses a C shim to communicate with FreeRTOS's API. Dynamic memory allocation is required at the moment.
First, add this to your
[dependencies] freertos_rs = "0.3"
Next, add this to your project:
extern crate freertos_rs; use freertos_rs::*;
This project includes unit tests that are run on the The GNU ARM Eclipse QEMU emulator. The basic firmware for STM32 is written in C, compiled with GCC and finally linked with the particular unit test's entry point. Since the QEMU emulator doesn't support FPU registers, slight changes were made to the FreeRTOS kernel. Lacking timer hardware emulation is simulated with a Systick-dependent IRQ trigger. Rust code invokes the cross compilation of this crate, compilation of the base firmware, final linkage and then runs the unit tests using the emulator.