All Projects → lobaro → FreeRTOS-rust

lobaro / FreeRTOS-rust

Licence: MIT license
Rust crate for FreeRTOS

Programming Languages

c
50402 projects - #5 most used programming language
assembly
5116 projects
rust
11053 projects

Projects that are alternatives of or similar to FreeRTOS-rust

Awesome Embedded
A curated list of awesome embedded programming.
Stars: ✭ 831 (+422.64%)
Mutual labels:  embedded, stm32, rtos
STM32 Base Project
STM32 Base project with a lot of stuff
Stars: ✭ 58 (-63.52%)
Mutual labels:  embedded, stm32, freertos
Drone
CLI utility for Drone, an Embedded Operating System.
Stars: ✭ 114 (-28.3%)
Mutual labels:  embedded, rtos
Tinyframe
A simple library for building and parsing data frames for serial interfaces (like UART / RS232)
Stars: ✭ 151 (-5.03%)
Mutual labels:  embedded, stm32
Lwesp
Lightweight Espressif AT parser library for ESP8266 and ESP32 devices.
Stars: ✭ 212 (+33.33%)
Mutual labels:  embedded, rtos
Stm32l4xx Hal
A Hardware abstraction layer for the stm32l432xx series chips written in rust.
Stars: ✭ 65 (-59.12%)
Mutual labels:  embedded, stm32
Awesome Canbus
🚛 A curated list of awesome CAN bus tools, hardware and resources
Stars: ✭ 73 (-54.09%)
Mutual labels:  embedded, stm32
Jled
Non-blocking LED controlling library for Arduino and friends.
Stars: ✭ 197 (+23.9%)
Mutual labels:  embedded, stm32
Robot Software
CVRA monorepo - All software running on our bots lives here
Stars: ✭ 39 (-75.47%)
Mutual labels:  embedded, stm32
XC-OS
Open source graphics operating system for microcontroller
Stars: ✭ 66 (-58.49%)
Mutual labels:  stm32, freertos
stm32 framework
一个志在实现STM32F1、F2和F4工程模板的项目,集成了FreeRTOS、LWIP、FATFS、DSP、USB、IAP、菜单库、有限状态机模板等等的组件,以及未来将加入的加密、BPNN、最小二乘、音频图片视频解码、LittlevGL等诸多常用的算法或组件,并具有良好的易用性、解耦性和可剪裁性!
Stars: ✭ 91 (-42.77%)
Mutual labels:  stm32, freertos
drone-stm32-map
STM32 peripheral mappings for Drone, an Embedded Operating System.
Stars: ✭ 16 (-89.94%)
Mutual labels:  stm32, rtos
Incubator Nuttx Apps
Apache NuttX Apps is a collection of tools, shells, network utilities, libraries, interpreters and can be used with the NuttX RTOS
Stars: ✭ 65 (-59.12%)
Mutual labels:  embedded, rtos
Cocoos
A cooperative operating system based on coroutines
Stars: ✭ 50 (-68.55%)
Mutual labels:  embedded, rtos
Lwmem
Lightweight dynamic memory manager library for embedded systems with memory constraints. It implements malloc, calloc, realloc and free functions
Stars: ✭ 92 (-42.14%)
Mutual labels:  embedded, stm32
Memfault Firmware Sdk
Memfault Firmware SDK for embedded systems. More information at https://docs.memfault.com.
Stars: ✭ 42 (-73.58%)
Mutual labels:  embedded, rtos
Frosted
Frosted: Free POSIX OS for tiny embedded devices
Stars: ✭ 194 (+22.01%)
Mutual labels:  embedded, stm32
Atomvm
Tiny Erlang VM
Stars: ✭ 834 (+424.53%)
Mutual labels:  embedded, stm32
pid-stm32f746
Embedded graphical interface for PID control
Stars: ✭ 29 (-81.76%)
Mutual labels:  stm32, freertos
Helios
The free embedded operating system.
Stars: ✭ 223 (+40.25%)
Mutual labels:  embedded, rtos

FreeRTOS-rust

This project is based on code from freertos.rs and some additions to simplify the usage of FreeRTOS in embedded applications written in Rust.

In contrast to freertos.rs this crate differs in these points:

  • The application main() entry point is written in Rust.
  • The FreeRTOS scheduler can be started from Rust.
  • The FreeRTOS heap MemMang/heap/heap_x.cis used as global memory allocator for Rust
  • No need for a Clang skeleton project

How it works

The freertos-cargo-build build-dependency compiles the FreeRTOS code from its original "C" sources files into an archive to be linked against your Rust app. Internally it uses the cc crate and some meta info provided by your apps build.rs:

  1. A path to the FreeRTOS Sources
  2. A path to the app specific FreeRTOSConfig.h
  3. A relative path to the FreeRTOS port to be used, e.g. for ARM Cortex-M3 cores.
  4. Optional: Additional C code to be compiled

The freertos-rust dependency provides an interface to access all FreeRTOS functionality from your (embedded) Rust app.

Usage

  1. Checkout FreeRTOS: https://github.com/FreeRTOS/FreeRTOS-Kernel

  2. Add dependencies to your Rust apps Cargo.toml

    [dependencies]
    freertos-rust = "*"
    
    [build-dependencies]
    freertos-cargo-build = "*"
    
  3. Add this snippet to your apps build.rs:

    fn main() {
        let mut b = freertos_cargo_build::Builder::new();
    
        // Path to FreeRTOS kernel or set ENV "FREERTOS_SRC" instead
        b.freertos("path/to/FreeRTOS-Kernel");
        b.freertos_config("src");       // Location of `FreeRTOSConfig.h` 
        b.freertos_port("GCC/ARM_CM3"); // Port dir relativ to 'FreeRTOS-Kernel/portable' 
        b.heap("heap4.c");              // Set the heap_?.c allocator to use from 
                                        // 'FreeRTOS-Kernel/portable/MemMang' (Default: heap_4.c)       
    
        // b.get_cc().file("More.c");   // Optional additional C-Code to be compiled
    
        b.compile().unwrap_or_else(|e| { panic!(e.to_string()) });
    }
    

Used C compiler

freertos-cargo-build depends on the cc crate. So the C compiler used can be set by using the CC enviroment variable or otherwise defined by internal defaults. For the ARM architecture this is the arm-none-eabi-gcc which can be found here.

Examples

To get started there are examples in freertos-rust-examples for:

  • Cortex M33 (nRF9160)
  • Cortex M3 (STM32L151CBU6A)
  • Cortex M4 (STM32F411CEU6)
  • Windows
  • ...more to come...

Project Crates

License

This repository is using the MIT License. Some parts might state different licenses that need to be respected when used.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].