Skip to content

hashmismatch/freertos.rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

freertos.rs

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.

RustNightly

Documentation

Introduction article

Usage

First, add this to your Cargo.toml:

[dependencies]
freertos_rs = "0.3"

Next, add this to your project:

extern crate freertos_rs;

use freertos_rs::*;

Unit tests

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.

Packages

No packages published

Languages