Cargo Features
esp-hal has no features set by default.
[dependencies]
esp-hal = { version = "0.22.0", features = ["riscv", "xtensa", "bluetooth", "usb-otg", "debug", "log", "esp32", "esp32c2", "esp32c3", "esp32c6", "esp32h2", "esp32s2", "esp32s3", "flip-link", "defmt", "quad-psram", "octal-psram", "ci", "digest"] }
- riscv esp32c2? esp32c3? esp32c6? esp32h2?
-
Enables riscv, restore-state-u8 of critical-section
- xtensa esp32? esp32s2? esp32s3?
-
Enables xtensa-lx, restore-state-u32 of critical-section
- bluetooth ci?
- usb-otg esp32s2? esp32s3?
-
Enables embassy-usb-driver, embassy-usb-synopsys-otg ^0.1.0, esp-synopsys-usb-otg, and usb-device
- debug
-
Enable debug features in the HAL (used for development).
Enables impl-register-debug of optional esp32, optional esp32c2, optional esp32c3, optional esp32c6, optional esp32h2, optional esp32s2, and optional esp32s3
esp32:
IMPORTANT:
Each supported device MUST have its PAC included below along with a corresponding feature. - log
-
Enable logging output using the
log
crate.Enables log
- esp32 = xtensa
-
Chip Support Feature Flags
Target the ESP32.Enables esp32, spin of xtensa-lx, esp32 of xtensa-lx-rt
- esp32c2 = riscv
-
Target the ESP32-C2.
Enables esp32c2, unsafe-assume-single-core of portable-atomic
- esp32c3 = riscv
-
Target the ESP32-C3.
Enables esp32c3, rtc-ram of esp-riscv-rt, unsafe-assume-single-core of portable-atomic
- esp32c6 = riscv
-
Target the ESP32-C6.
Enables esp32c6, rtc-ram of esp-riscv-rt, has-lp-core of esp-hal-procmacros
- esp32h2 = riscv
-
Target the ESP32-H2.
Enables esp32h2, rtc-ram of esp-riscv-rt
- esp32s2 = usb-otg, xtensa
-
Target the ESP32-S2.
Enables esp32s2, critical-section of portable-atomic, has-ulp-core of esp-hal-procmacros, esp32s2 of xtensa-lx-rt
- esp32s3 = usb-otg, xtensa
-
Target the ESP32-S3.
Enables esp32s3, has-ulp-core of esp-hal-procmacros, spin of xtensa-lx, esp32s3 of xtensa-lx-rt
- flip-link
-
RISC-V Exclusive Feature Flags
Move the stack to start of RAM to get zero-cost stack overflow protection (ESP32-C6 and ESPS32-H2 only!).
Enables fix-sp of esp-riscv-rt
- defmt ci?
-
Trait Implementation Feature Flags
Implement
defmt::Format
on certain types.Enables defmt, defmt of embassy-futures and embassy-sync, defmt-03 of embedded-hal, embedded-io, and embedded-io-async, defmt of fugit, optional esp32, optional esp32c2, optional esp32c3, optional esp32c6, optional esp32h2, optional esp32s2, and optional esp32s3
- quad-psram
-
PSRAM Feature Flags
Use externally connected Quad PSRAM
Affects
esp32::psram
,esp32s2::psram
,esp32s3::psram
… - octal-psram
-
Use externally connected Octal RAM
Affects
esp32s3::psram
… - ci = bluetooth, defmt
-
This feature is intended for testing; you probably don't want to enable it: