| Crates.io | freertos-next |
| lib.rs | freertos-next |
| version | 0.12.0 |
| created_at | 2025-12-14 03:26:05.376+00 |
| updated_at | 2026-01-23 00:56:24.331535+00 |
| description | Create to use FreeRTOS in rust projects. The freertos-build crate can be used to build and link FreeRTOS from source inside build.rs. |
| homepage | https://github.com/mcu-rust/FreeRTOS/tree/main/freertos |
| repository | |
| max_upload_size | |
| id | 1983730 |
| size | 10,215,891 |
freertos-next is a Rust wrapper for the FreeRTOS API.
V11.2.0).
If you need a customized setup, you can prepare your own kernel source files and call b.freertos("path/to/your/kernel"); in your build.rs.The crate is published as freertos-next on crates.io because the more obvious names (freertos, freertos-rust) are already taken.
freertos-next works together with freertos-build.
cargo add freertos-next
cargo add --build freertos-build
build.rs:use freertos_build::prelude::*;
fn main() {
let mut b = freertos_build::Builder::new();
b.cpu_clock(72.MHz());
b.heap_size(10 * 1024);
b.minimal_stack_size(80);
b.interrupt_priority_bits(4, 5, 15);
b.compile().unwrap();
}
A complete example using freertos-next with stm32f1-hal is available here: stm32f1-FreeRTOS-example
freertos-build uses the cc crate to compile the FreeRTOS kernel.
The C compiler can be configured via the CC environment variable, or it will fall back to the defaults provided by cc.
For ARM targets, the expected compiler is arm-none-eabi-gcc, which can be obtained from the ARM GNU toolchain.
# Ubuntu
sudo apt-get install -y gcc-arm-none-eabi
# Windows (Scoop)
scoop install gcc-arm-none-eabi
See also the main repository.