no_std Hardware Abstraction Layers for ESP32 microcontrollers
Go to file
Jesse Braham c63f40f412
Actually enforce clippy lints in CI (#767)
* Actually enforce clippy lints in CI

* Fix a couple clippy lints in `esp-riscv-rt`

* Fix a couple clippy lints for `esp32c6-lp-hal`
2023-08-30 10:30:36 -07:00
.github Actually enforce clippy lints in CI (#767) 2023-08-30 10:30:36 -07:00
esp32-hal Disable all watchdog timers at startup by default (#763) 2023-08-30 08:54:01 -07:00
esp32c2-hal Disable all watchdog timers at startup by default (#763) 2023-08-30 08:54:01 -07:00
esp32c3-hal Disable all watchdog timers at startup by default (#763) 2023-08-30 08:54:01 -07:00
esp32c6-hal Disable all watchdog timers at startup by default (#763) 2023-08-30 08:54:01 -07:00
esp32c6-lp-hal Actually enforce clippy lints in CI (#767) 2023-08-30 10:30:36 -07:00
esp32h2-hal Disable all watchdog timers at startup by default (#763) 2023-08-30 08:54:01 -07:00
esp32s2-hal Disable all watchdog timers at startup by default (#763) 2023-08-30 08:54:01 -07:00
esp32s3-hal Disable all watchdog timers at startup by default (#763) 2023-08-30 08:54:01 -07:00
esp-hal-common Disable all watchdog timers at startup by default (#763) 2023-08-30 08:54:01 -07:00
esp-hal-procmacros Documenting a number of peripherals and packages (#680) 2023-08-09 06:33:50 -07:00
esp-hal-smartled New package releases (#713) 2023-08-10 08:44:15 -07:00
esp-riscv-rt Actually enforce clippy lints in CI (#767) 2023-08-30 10:30:36 -07:00
resources Add a simple CONTRIBUTING.md guide 2023-08-14 09:35:13 -07:00
.gitattributes Set merge=union git attribute for CHANGELOG.md 2023-07-12 09:24:09 -07:00
.gitignore move rwtext after other RAM data sections (#464) 2023-03-31 14:27:53 +01:00
CHANGELOG.md Disable all watchdog timers at startup by default (#763) 2023-08-30 08:54:01 -07:00
CONTRIBUTING.md Add a simple CONTRIBUTING.md guide 2023-08-14 09:35:13 -07:00
esp-hal.code-workspace Create the esp32c6-lp-hal package (#714) 2023-08-10 09:48:46 -07:00
LICENSE-APACHE Initial commit 2021-10-19 15:00:41 -07:00
LICENSE-MIT Initial commit 2021-10-19 15:00:41 -07:00
pre-commit Improve the pre-commit hook 2023-05-11 08:53:03 -07:00
README.md Update the top-level README 2023-08-23 07:42:56 -07:00
rustfmt.toml Begin adding some doc comments, update rustfmt config 2022-01-10 15:23:01 -08:00

esp-hal

GitHub Workflow Status MIT/Apache-2.0 licensed Matrix

Hardware Abstraction Layer crates for the ESP32, ESP32-C2/C3/C6, ESP32-H2, and ESP32-S2/S3 from Espressif.

These HALs are no_std; if you are looking for std support, please use esp-idf-hal instead.

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

Note

This project is still in the relatively early stages of development, and as such there should be no expectation of API stability. A significant number of peripherals currently have drivers implemented but have varying levels of functionality. For most basic tasks, this should be usable already, however some more advanced or uncommon features may not yet be implemented.

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 on crates.io for the relevant chip.

Resources

HAL Crates

Crate Target Technical Reference Manual
esp32-hal xtensa-esp32-none-elf ESP32
esp32c2-hal riscv32imc-unknown-none-elf ESP32-C2
esp32c3-hal riscv32imc-unknown-none-elf ESP32-C3
esp32c6-hal riscv32imac-unknown-none-elf ESP32-C6
esp32c6-lp-hal riscv32imac-unknown-none-elf N/A
esp32h2-hal riscv32imac-unknown-none-elf ESP32-H2
esp32s2-hal xtensa-esp32s2-none-elf ESP32-S2
esp32s3-hal xtensa-esp32s3-none-elf ESP32-S3

Ancillary Crates

There are a number of other crates within the esp-rs organization which can be used in conjunction with esp-hal:

Crate Description
esp-alloc A simple no_std heap allocator
esp-backtrace Backtrace support for bare-metal applications
esp-ieee802154 Low-level IEEE802.15.4 driver for the ESP32-C6 and ESP32-H2
esp-println Provides print! and println! implementations
esp-storage Implementation of embedded-storage traits to access unencrypted flash memory
esp-wifi no_std Wi-Fi/Bluetooth LE support

Git Hooks

We provide a simple pre-commit hook to verify the formatting of each package prior to committing changes. We strongly encourage use of this git hook.

The hook can be enabled by copying it in to the .git/hooks/ directory:

cp pre-commit .git/hooks/pre-commit

When using this hook, you can choose to ignore its failure on a per-commit basis by committing with the --no-verify flag; however, you will need to be sure that all packages are formatted when submitting a pull request.

MSRV

The Minimum Supported Rust Versions are:

  • nightly-2022-09-16 for RISC-V devices (ESP32-C2, ESP32-C3, ESP32-C6, ESP32-H2)
    • This corresponds to the date that the 1.65.0 release was branched from master
  • 1.65.0 for Xtensa devices (ESP32, ESP32-S2, ESP32-S3)
  • 1.67.0 for all async examples (embassy_hello_world, embassy_wait, etc.)

It should be noted that targeting the Xtensa ISA currently requires the use of the esp-rs/rust compiler fork. Our recommend method of installation is espup.

RISC-V is officially supported by the official Rust compiler.

License

Licensed under either of:

at your option.

Contribution

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.