FreeRTOS Rust
Wrapper library to use FreeRTOS API in Rust.
Note: This is a fork of freertos-rust updated for use with Picodroid. Published on crates.io as
freertos-rust-pd.
To build an embedded application with FreeRTOS please refer to freertos-rust home.
Additions over upstream
- Cortex-M0/M0+ support — integrates
portable-atomicfor software atomics on targets without hardware atomics (e.g. RP2040) - Event groups — full support for FreeRTOS event group synchronization primitives
- Semaphore ISR methods — semaphore give/take from interrupt service routines
xTaskAbortDelay— abort a delayed task to wake it earlySuspendSchedulertype — RAII guard for safely suspending and resuming the scheduler- Raw handle APIs — convert to/from raw FreeRTOS handles for Mutex, Queue, Semaphore, Task, and Timer to ease interop with C code
- Broader type bounds — Queue and Mutex now accept
Sendtypes instead of requiringCopy delete_taskfeature flag — opt out ofvTaskDelete()for targets that disable it- Periodic timer fix — fixed bug where periodic timers fired only once
- ISR yield fix —
InterruptContextdrop now correctly callsportYIELD_FROM_ISR()instead ofportYIELD()
Usage
The crate is published on crates.io
[dependencies]
freertos-rust-pd = "*"