Giter Club home page Giter Club logo

awesome-embedded-rust's Introduction

Embedded Rust

Awesome

This is a curated list of resources related to embedded and low-level programming in the programming language Rust, including a list of useful crates.

This project is developed and maintained by the Resources team.

Table of contents

Community

In 2018 Rust community has created an embedded workgroup to help drive adoption in the Rust ecosystem.

  • Embedded WG, including newsletters with progress updates.

  • You can usually find the members of the embedded WG on the #rust-embedded channel (server: irc.mozilla.org).

  • embedded.rs Telegram chat about Rust for microcontrollers in Russian language.

Books, blogs and training materials

  • Discovery by @rust-embedded — this book is an introductory course on microcontroller-based embedded systems that uses Rust as the teaching language. Original author: @japaric
  • Cortex-M Quickstart by @japaric – a template and introduction to embedded Rust, suitable for developers familiar to embedded development but new to embedded Rust.
  • Exploring Rust on Teensy by @branan — Beginner set of articles on getting into embedded dev in Rust.
  • Pragmatic Bare Metal Rust A starter article about starting Rust development on STM32 microcontrollers (cubeMX + FFI).
  • Using Rust in an Embedded Project: A Simple Example Article and some links on setting up Rust cross-compiling.
  • Robigalia IoT operating system in Rust running on secure seL4 microkernel.
  • Tock An embedded operating system designed for running multiple concurrent, mutually distrustful applications on low-memory and low-power microcontrollers
  • intermezzOS A small teaching operating system in Rust. A book with some explanations is also included.
  • Raspberry Pi Bare Metal Programming with Rust
  • Fearless concurrency by @japaric — How to easily develop Rust programs for pretty much any ARM Cortex-M microcontroller with memory-safe concurrency.
  • RTFM v2 Real-Time For the Masses — Cortex-M programming framework for building concurrent applications.
  • cortex-m rtfm RTFM framework for ARM Cortex-M microcontrollers
  • msp430 rtfm RTFM framework for MSP430 MCUs
  • FreeRTOS.rs Rust interface for the FreeRTOS API
  • MicroRust Introductory book for embedded development in Rust on the micro:bit.
  • Physical Computing With Rust A (WIP) guide to physical computing with Rust on the Raspberry Pi.

Tools

  • xargo Rust package manager with support for non-default std libraries — build rust runtime for your own embedded system.
  • svd2rust Generate Rust structs with register mappings from SVD files.
  • μtest unit testing for microcontrollers and other no-std systems.
  • bindgen Automatically generates Rust FFI bindings to C and C++ libraries. - crates.io
  • cortex-m semihosting Semihosting for ARM Cortex-M processors
  • bobbin-cli A Rust command line tool to simplify embedded development and deployment.
  • cargo-fel4 A Cargo subcommand for working with feL4 projects. - crates.io

Device crates

Register definition for microcontroller families. Usually generated using svd2rust. - crates.io

NOTE You may be able to find even more device crates by searching for the svd2rust keyword on crates.io!

Microchip

  • atsamd21 Peripheral access API for Microchip (formerly Atmel) SAMD21 microcontrollers. This git repo hosts both the device crate and the hal.

Nordic

  • nrf51 Peripheral access API for nRF51 microcontrollers (generated using svd2rust) - crates.io

NXP

STMicroelectronics

  • stm32f042 - crates.io
  • stm32f103xx Peripheral access API for STM32F103XX microcontrollers (generated using svd2rust) - crates.io
  • stm32f100xx Peripheral access API for STM32F100XX microcontrollers (generated using svd2rust) - crates.io
  • stm32f30x Peripheral access API for STM32F30X microcontrollers (generated using svd2rust) - crates.io
  • stm32f429 Peripheral access API for STM32F429 microcontrollers (generated using svd2rust) - crates.io
  • stm32f469xx Peripheral access API for STM32f469XX microcontrollers (generated using svd2rust) -crates.io
  • stm32l151 - crates.io

Texas Instruments

  • tm4c123x Peripheral access API for TM4C123x microcontrollers (generated using svd2rust)
  • tm4c129x Peripheral access API for TM4C129x microcontrollers (generated using svd2rust)

MSP430

  • msp430g2553 Peripheral access API for MSP430G2553 microcontrollers (generated using svd2rust)
  • rust on msp Simple blinking LED example that runs on MSP430.
  • msp430 quickstart some examples for msp430

HAL implementation crates

Implementations of embedded-hal for microcontroller families and systems running some OS. - crates.io

NOTE You may be able to find even more HAL implementation crates by searching for the embedded-hal-impl and embedded-hal keywords on crates.io!

OS

Nordic

NXP

Also check the list of NXP board support crates!

STMicroelectronics

Also check the list of STMicroelectronics board support crates!

Texas Instruments

Espressif

Architecture support crates

Crates tailored for general CPU architectures.

ARM

  • cortex-m Low level access to Cortex-M processors - crates.io
  • cortex-a Low level access to Cortex-A processors (early state) - crates.io

Board support crates

Crates tailored for specific boards.

Nordic

NXP

STMicroelectronics

Texas Instruments

  • stellaris-launchpad - For the Texas Instruments Stellaris Launchpad and Tiva-C Launchpad crates.io
  • monotron - A 1980s home-computer style application for the Texas Instruments Stellaris Launchpad. PS/2 keyboard input, text output on a bit-bashed 800x600 VGA signal. Uses menu, vga-framebuffer and pc-keyboard.

Special Purpose

  • betafpv-f3 - For the BetaFPV F3 drone flight controller

Driver crates

Platform agnostic crates to interface external components. These crates use the embedded-hal interface to support all the devices and systems that implement the embedded-hal traits.

The list below contains drivers developed as part of the Weekly Driver initiative and that have achieved the "released" status (published on crates.io + documentation / short blog post).

  1. L3GD20 - SPI - Gyroscope - Intro blog post - crates.io
  2. LSM303DLHC - I2C - Accelerometer + compass (magnetometer) - Intro blog post - crates.io
  3. MCP3008 - SPI - 8 channel 10-bit ADC - Intro blog post - crates.io
  4. ENC28J60 - SPI - Ethernet controller - Intro blog post - crates.io
  5. MCP3425 - I2C - 16-bit ADC - Intro blog post - crates.io
  6. SGP30 - I2C - Gas sensor - Intro blog post - crates.io
  7. HTS221 - I2C - Humidity and temperature sensor - Intro blog post - crates.io
  8. SSD1306 - I2C/SPI - OLED display controller - Intro blog post - crates.io
  9. MMA7660FC - I2C - 3-axis accelerometer - Intro blog post
  10. shift-register-driver - GPIO - Shift register - Intro blog post - crates.io
  11. TSL256X - I2C - Light Intensity Sensor - Intro blog post - crates.io
  12. EEPROM24x - I2C - 24x series serial EEPROM driver - Intro blog post - crates.io
  13. DS1307 - I2C - Real-time clock driver - Intro blog post - crates.io
  14. keypad - GPIO - Keypad matrix circuits - Intro post - crates.io
  15. BlueNRG - SPI - driver for BlueNRG-MS Bluetooth module - Intro post crates.io

NOTE You may be able to find even more driver crates by searching for the embedded-hal-driver keyword on crates.io!

WIP

Work in progress drivers. Help the authors make these crates awesome!

  • MFRC522 - SPI - RFID tag reader/writer
  • MPU9250 - SPI - Accelerometer + gyroscope + compass
  • motor-driver - Motor drivers: L298N, TB6612FNG, etc.
  • MAG3110 - I2C - Magnetometer
  • SI5351 - I2C - clock generator
  • SI7021 - I2C - Humidity and temperature sensor
  • MAX7219 - SPI - LED display driver
  • DS3231 - I2C - real time clock
  • BH1750 - I2C - ambient light sensor (lux meter)
  • SHT2x - I2C - temperature / humidity sensors
  • INA260 - I2C - power monitor - crates.io
  • ILI9341 - SPI - TFT LCD display
  • HD44780 - Parallel port - LCD controller
  • HD44780-driver - GPIO - LCD controller - crates.io
  • MCP9808 - I2C - Temperature sensor - crates.io
  • AXP209 - I2C - Power management unit
  • DS3234 - SPI - Real time clock
  • PCD8544 - SPI - 48x84 pixels matrix LCD controller
  • PCD8544_rich - SPI - Rich driver for 48x84 pixels matrix LCD controller - crates.io
  • HC-SR04 - DIO - Ultrasound sensor
  • AFE4400 - SPI - Pulse oximeter
  • SX1278 - SPI - Long range (LoRa) transceiver
  • RFM69 - SPI - ISM radio transceiver
  • LS010B7DH01 - SPI - Memory LCD
  • MAX31855 - SPI - Thermocouple digital converter
  • MAX31865 - SPI - RTD to Digital converter - crates.io
  • SHT3x - I2C - Temperature / humidity sensors
  • SX1509 - I2C - IO Expander / Keypad driver
  • NRF24L01 - SPI - 2.4 GHz wireless communication
  • embedded-nrf24l01 - SPI+GPIO - 2.4 GHz radio
  • stm32-eth - MCU - Ethernet
  • bme680 - I2C - Temperature / humidity / gas / pressure sensor - crates.io
  • w5500 - SPI - Ethernet Module with hardwired protocols : TCP, UDP, ICMP, IPv4, ARP, IGMP, PPPoE - crates.io
  • OneWire - 1wire - OneWire protocol implementation with drivers for devices such as DS18B20 - crates.io
  • SSD1322 - SPI - Graphical OLED display controller - crates.io
  • GridEYE - I2C - Rust driver for Grid-EYE / Panasonic AMG88(33)
  • PCF857x - I2C - I/O expanders: PCF8574, PCF8574A, PCF8575 crates.io
  • eink-waveshare - SPI - driver for E-Paper Modules from Waveshare
  • xCA9548A - I2C - I2C switches/multiplexers: TCA9548A, PCA9548A
  • SSD1351 - SPI - 16bit colour OLED display driver - crates.io

no-std crates

#![no_std] crates designed to run on resource constrained devices.

  • bit_field: manipulating bitfields and bitarrays - crates.io
  • heapless: provides Vec, String, LinearMap, RingBuffer backed by fixed-size buffers - crates.io
  • intrusive-collections: intrusive (non-allocating) singly/doubly linked lists and red-black trees - crates.io
  • managed: provides ManagedSlice, ManagedMap backed by either their std counterparts or fixed-size buffers for #![no_std]. - crates.io
  • nalgebra: general-purpose and low-dimensional linear algebra library - crates.io
  • smoltcp: a small TCP/IP stack that runs without alloc
  • embedded-graphics: 2D drawing library for any size display - crates.io
  • scroll: extensible and endian-aware Read/Write traits for generic containers - crates.io
  • vga-framebuffer: A VGA signal generator and font renderer for VGA-less microcontrollers. Used by Monotron to generate 48 by 36 character display using 3 SPI peripherals and a timer.
  • menu: A basic command-line interface library. Has nested menus and basic help functionality.
  • pc-keyboard: A PS/2 keyboard protocol driver. Transport (bit-banging or SPI) agnostic, but can convert Set 2 Scancodes into Unicode.
  • console-traits: Describes a basic text console. Used by menu and implemented by vga-framebuffer.
  • register-rs: Unified interface for MMIO and CPU registers. Provides type-safe bitfield manipulation. - crates.io
  • bluetooth-hci: device-independent Bluetooth Host-Controller Interface implementation. crates.io

WIP

Work in progress crates. Help the authors make these crates awesome!

  • light-cli: a lightweight heapless cli interface
  • OxCC: A port of Open Source Car Control written in Rust

Rust forks

AVR

  • AVR Rust Fork of Rust with AVR support.

Firmware projects

  • anne-key: Alternate keyboard firmware for the Obins ANNE Pro

License

This list is licensed under

Code of Conduct

Contribution to this crate is organized under the terms of the Rust Code of Conduct, the maintainer of this crate, the HAL team, promises to intervene to uphold that code of conduct.

awesome-embedded-rust's People

Contributors

adamgreig avatar andre-richter avatar astro avatar berkus avatar caemor avatar chrysn avatar danielgallagher0 avatar edarc avatar eldruin avatar emosenkis avatar hannobraun avatar hdhoang avatar jamwaffles avatar japaric avatar johndoneth avatar jonlamb-gh avatar joshmcguigan avatar kellerkindt avatar kubo39 avatar mabezdev avatar maikelwever avatar memoryruins avatar miek avatar rahul-thakoor avatar thejpster avatar therealprof avatar timbod7 avatar uwearzt avatar wez avatar whitequark avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.