2022-01-12 13:52:01 -08:00
2022-01-06 07:57:55 -08:00
2022-01-12 13:52:01 -08:00
2022-01-12 13:52:01 -08:00
2022-01-12 13:52:01 -08:00
2022-01-12 13:52:01 -08:00
2021-10-19 15:00:41 -07:00
2022-01-06 07:57:55 -08:00
2021-10-19 15:00:41 -07:00
2021-10-19 15:00:41 -07:00
2022-01-12 13:52:01 -08:00

esp-hal

GitHub Workflow Status MIT/Apache-2.0 licensed Matrix

An extremely experimental attempt at writing a HAL which targets the ESP32, ESP32-C3, ESP32-S2, and ESP32-S3.

If you are interested in no_std development for ESP devices, we encourage you to contribute whatever you can to this repository!

IMPORTANT:

These crates should not be used for anything other than experimentation at this point in time, this is merely a proof-of-concept.

The esp32-hal package in this repository is NOT the same as the one published on crates.io. The published crate can be found in the esp-rs/esp32-hal repository. Once feature parity has been reached, the hope is for the version in this repository to supersede the old one.

The various packages in this repository may or may not build at any given time.

Until the first releases are published, there should be no expectation of API stability.

Please make sure you understand all the points above, and use these packages at your own risk. When the packages in this repository are ready for general use this README will be updated to indicate such.

For additional updates, please follow along in the esp-rs channel on Matrix.

What is working?

Currently, only the esp32-hal and esp32c3-hal packages contain functional examples. Please see the Notes on the ESP32-S2 and ESP32-S3 below for more information on why this is the case.

For the ESP32 and ESP32-C3, the following peripherals have some level of functionality:

  • GPIO pins can be used as digital inputs or outputs
  • TIMG instances can be used as general-purpose timers
  • UART can be used for bi-directional communication with another device
  • The DelayMs and DelayUs traits from embedded-hal have been implemented
    • Uses the SYSTIMER peripheral for the ESP32-C3, and the built in Xtensa timers for the other chips

What is NOT working?

Everything else.

Notes on the ESP32-S2 and ESP32-S3

At this time, there are two major issues blocking progress on the ESP32-S2 and ESP32-S3:

  • The lack of runtime support via xtensa-lx-rt
  • The omission of linker scripts, required for actually building the binaries

Once these issues have been resolved, progress can resume on the esp32s2-hal and esp32s3-hal crates.

Peripheral Access Crates

For the time being, the esp-hal-common package is using git dependencies pointing to forks of the various PACs. This is being done for two reasons:

  • While the existing esp32-hal crate exists, so must esp32; however, updating the esp32 crate to the newer SVD causes breaking changes
  • To enable rapid patching and prototyping without interfering with the mainline repositories

Once development has progressed further and the PACs are mostly in line with each other, the dependencies can be reverted to their traditional forms.

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.

Description
no_std Hardware Abstraction Layers for ESP32 microcontrollers
Readme 110 MiB
Languages
Rust 99.8%
Jinja 0.1%