Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hashmismatch/freertos.rs
A Rust wrapper for FreeRTOS.
https://github.com/hashmismatch/freertos.rs
firmware freertos rust
Last synced: 9 days ago
JSON representation
A Rust wrapper for FreeRTOS.
- Host: GitHub
- URL: https://github.com/hashmismatch/freertos.rs
- Owner: hashmismatch
- Created: 2016-09-27T14:22:51.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-11-12T23:16:43.000Z (almost 4 years ago)
- Last Synced: 2024-05-19T14:31:42.538Z (6 months ago)
- Topics: firmware, freertos, rust
- Language: C
- Homepage:
- Size: 947 KB
- Stars: 227
- Watchers: 9
- Forks: 22
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- rust-embedded - FreeRTOS.rs
- awesome-embedded-rust - FreeRTOS.rs
README
# freertos.rs
A Rust wrapper for [FreeRTOS](http://www.freertos.org/). 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](https://github.com/hashmismatch/freertos.rs/workflows/RustNightly/badge.svg)
[![Documentation](https://docs.rs/freertos_rs/badge.svg)](https://docs.rs/freertos_rs)
[Introduction article](http://www.hashmismatch.net/freertos-meets-rust/)
## Usage
First, add this to your `Cargo.toml`:
```toml
[dependencies]
freertos_rs = "0.3"
```Next, add this to your project:
```rust
extern crate freertos_rs;use freertos_rs::*;
```## Unit tests
This project includes [unit tests](qemu_stm32_tests/src/) that are run on the [The GNU ARM Eclipse QEMU](http://gnuarmeclipse.github.io/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.