esp-hal

repository·main·Indexed 24 days ago

https://github.com/esp-rs/esp-hal

A bare-metal (no_std) hardware abstraction layer for Espressif ESP32 series microcontrollers, providing a Rust interface for direct hardware access. The repository includes related crates such as esp-alloc for heap allocation, esp-backtrace for panic handling, esp-lp-hal for low-power RISC-V coprocessors, and esp-println for logging. It supports a wide range of chips including ESP32, ESP32-C, ESP32-S, and ESP32-H series across Xtensa and RISC-V targets.

Tokens
56.4K
Snippets
111
Records
298
Agent score
81%

What's inside esp-hal

  1. Overview of esp-lp-hal

    main

    esp-lp-hal is a bare-metal (no_std) hardware abstraction layer (HAL) designed for the low-power RISC-V coprocessors found in Espressif chips. It implements various blocking and async traits from the embedded-hal ecosystem, allowing for standardized hardware interaction on these specific coprocessors.

    For detailed getting started instructions, refer to The Rust on ESP Book or the official documentation.

  2. Overview of esp-bootloader-esp-idf

    main

    esp-bootloader-esp-idf provides additional support for the ESP-IDF 2nd stage bootloader. It is designed for use in ESP32 development environments where the ESP-IDF bootloader is utilized.

    Minimum Supported Rust Version (MSRV)

    The crate is guaranteed to compile with the latest stable Rust version available at the time of its release. While it may work with older versions, this is not guaranteed for future releases or patches.

  3. What is esp-sync?

    main
    esp-sync is a crate that provides an optimized raw mutex for ESP32 devices. Unlike standard mutexes that wrap a data type, this is a raw lock type, meaning it does not own or wrap any data, allowing for more flexible low-level synchronization in bare-metal ESP32 environments.
  4. Overview of esp-hal

    main

    esp-hal is a bare-metal (no_std) hardware abstraction layer (HAL) for Espressif devices. It provides a consistent Rust interface for interacting with various ESP32 series microcontrollers.

    Supported Devices

    • ESP32 Series: ESP32
    • ESP32-C Series: ESP32-C2, ESP32-C3, ESP32-C5, ESP32-C6, ESP32-C61
    • ESP32-H Series: ESP32-H2
    • ESP32-P Series: ESP32-P4
    • ESP32-S Series: ESP32-S2, ESP32-S3

    Low-Power Cores

    Support for programming the low-power RISC-V cores found in the ESP32-C6, ESP32-S2, and ESP32-S3 is provided via the esp-lp-hal package.

  5. What is esp-phy?

    main
    The esp-phy crate provides the implementation for PHY (Physical Layer) initialization handling specifically for ESP32 devices. It is used to manage the low-level hardware initialization required for radio or physical layer components in the ESP32 ecosystem.
  6. Overview of esp-rtos

    main
    esp-rtos is a Real-Time Operating System (RTOS) implementation designed specifically for esp-hal. It provides the essential runtime environment required to execute async code on ESP32 hardware. Additionally, it implements core RTOS capabilities such as threads and queues, which are required by esp-radio.
  7. Use esp-riscv-rt for RISC-V Espressif device startup

    main
    The esp-riscv-rt crate provides a minimal runtime and startup sequence for Espressif RISC-V based microcontrollers. It builds upon the rust-embedded/riscv crate and includes custom code necessary for the specific requirements of Espressif hardware. Use this crate when developing bare-metal Rust applications for RISC-V ESP32 series chips to ensure proper initialization of the device before entering the main application logic.