Skip to content
esp-rsPublic

About

no_std Hardware Abstraction Layers for ESP32 microcontrollers

Topics

Resources

Stars

2.2k stars

Watchers

28 watching

Forks

Latest commit

Β 

History

4,240 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

esp-rs logo

esp-hal

GitHub Actions Workflow Status GitHub Actions Workflow Status MIT/Apache-2.0 licensed Matrix

Bare-metal (no_std) hardware abstraction layer for Espressif devices. Currently supports the following devices:

Chip Documentation Target Note
ESP32 Datasheet TRM xtensa-esp32-none-elf Revisions below v3.0 are not supported.
ESP32-C2 Datasheet TRM riscv32imc-unknown-none-elf
ESP32-C3 Datasheet TRM riscv32imc-unknown-none-elf
ESP32-C5 Datasheet TRM riscv32imac-unknown-none-elf
ESP32-C6 Datasheet TRM riscv32imac-unknown-none-elf
ESP32-C61 Datasheet TRM riscv32imac-unknown-none-elf
ESP32-H2 Datasheet TRM riscv32imac-unknown-none-elf
ESP32-H4 Datasheet TRM riscv32imafc-unknown-none-elf
ESP32-P4 Datasheet TRM riscv32imafc-unknown-none-elf Revisions below v3.0 are not supported.
ESP32-S2 Datasheet TRM xtensa-esp32s2-none-elf
ESP32-S3 Datasheet TRM xtensa-esp32s3-none-elf
ESP32-S31 Datasheet TRM riscv32imafc-unknown-none-elf

Additionally provides support for programming the low-power RISC-V cores found on the ESP32-C6, ESP32-S2, and ESP32-S3 via the esp-lp-hal package.

For additional information regarding any of the crates in this repository, please refer to the relevant crate's README.md file. If you have any questions, comments, or concerns, please open an issue, or join us on Matrix.

If you are currently using (or considering using) esp-hal in a production environment and have any feedback or require support, please feel free to contact us at rust.support@espressif.com.

Note

This repository includes crates that are at various stages of maturity and stability. While many functionalities have already been implemented and are usable for most tasks, certain advanced or less common features may still be under development. Each crate may offer different levels of functionality and guarantees.

Getting Started

For information relating to the development of Rust applications on ESP devices, please first read The Rust on ESP Book.

For information about the HAL and how to use it in your own projects, please refer to the documentation.

When browsing the examples, we recommend viewing the tag for the esp-hal release you are using to ensure compatibility, e.g. esp-hal-v1.0.0, as the main branch is used for development and APIs may have changed in the meantime.

Peripheral support

For a detailed per-chip support matrix, see the documentation index.

  • ❌: Not supported
  • ⚠️: Planned overhaul (unstable, expect major breaking changes)
  • 🚧: Unstable (requires the unstable feature)
  • βœ”οΈ: Stable
Driver Status
GPIO βœ”οΈ
Dedicated GPIO 🚧
IOMUX 🚧
LP IO 🚧
Driver Status
UART βœ”οΈ
LP UART 🚧
UHCI 🚧
I2C master βœ”οΈ
LP I2C master 🚧
I2C slave 🚧
I3C master ❌
I3C slave ❌
SPI master βœ”οΈ
SPI slave 🚧
LP SPI master ❌
LP SPI slave ❌
I2S 🚧
LP I2S ❌
PARL_IO 🚧
RMT 🚧
SDMMC/SDIO host 🚧
SDIO slave ❌
TWAI 🚧
CANFD 🚧
USB OTG FS 🚧
USB OTG HS 🚧
USB Serial/JTAG 🚧
Driver Status
Bluetooth 🚧
WIFI 🚧
IEEE 802.15.4 🚧
Ethernet 🚧
Driver Status
Camera interface 🚧
MIPI-CSI ❌
MIPI-DSI 🚧
RGB display 🚧
SPI LCD interface ❌ 1
Driver Status
Bit Scrambler ❌
Image Signal Processor ❌
Pixel Processing Accelerator 🚧
JPEG Codec 🚧
H.264 encoder ❌
Audio Sample Rate Converter ❌
CORDIC accelerator 🚧
Voice Activity Detection ❌
Driver Status
ADC 🚧
Analog Voltage Comparator ❌
DAC 🚧
Temperature sensor 🚧
Touch 🚧
Driver Status
LEDC ⚠️ 1
2D DMA 🚧
MCPWM 🚧
PCNT 🚧
RTC Timekeeping 🚧
SDM 🚧
SYSTIMER 🚧
Timers 🚧
Driver Status
AES 🚧
RSA Digital Signature ❌
ECDSA Digital Signature ❌
ECC 🚧
HMAC 🚧
Key Manager ❌
RNG βœ”οΈ
RSA 🚧
SHA 🚧
Driver Status
Light/deep sleep 🚧
ULP (FSM) ❌ 1
ULP (RISC-V) 🚧
Driver Status
ASSIST_DEBUG 🚧
DMA 🚧
ETM 🚧
Interrupts 🚧
Flash 🚧
PSRAM 🚧

Resources

Support policy

All active development will occur on main.

We will only backport fixes to the latest minor release in a major version. For example, this means we will apply patches (bug fixes) to 1.1.x until 1.2.0 is released, at which point all patches are only backported to the 1.2.x series of releases.

If you are a user of unstable APIs, we will never push breaking changes in a patch release. However, unstable changes will make their way into minor releases. This means that as an unstable user updating from 1.1.x to 1.2.x may introduce breaking changes. If you depend on unstable, we recommend defining your esp-hal dependency as follows:

esp-hal = { version = "~1.1" }

Using the ~ operator will prevent cargo auto updating to minor versions, allowing you to use cargo update without the possibility of breaking your project.

Release policy

For how releases are prepared, staged as release candidates, and published, see RELEASING.md.

AI Contribution Policy

We follow the same policy as the official Rust Embedded working group, please review the policy before contributing with AI tools.

Contributing

We have a number of living documents to aid contributing to the project, please give these a read before modifying code:

License

All packages within this repository are licensed under either of:

at your option.

Contribution notice

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Footnotes

  1. This cell is clickable and will open the peripheral's issue on GitHub ↩ ↩2 ↩3

About

no_std Hardware Abstraction Layers for ESP32 microcontrollers

Topics

Resources

Stars

2.2k stars

Watchers

28 watching

Forks

Releases

Used by

Contributors

Languages