Cargo Features
esp-rtos has no features set by default.
[dependencies]
esp-rtos = { version = "0.2.0", features = ["embassy", "esp-radio", "alloc", "esp-alloc", "rtos-trace", "esp32", "esp32c2", "esp32c3", "esp32c6", "esp32h2", "esp32s2", "esp32s3", "log-04", "defmt"] }
- embassy
-
Enable embassy integration (time driver and executors).
Enables embassy-executor, embassy-time-driver, and embassy-time-queue-utils
embassy-time-driver:
Optional dependencies that enable ecosystem support.
Affects
esp-rtos::embassy… - esp-radio = alloc
-
Enable esp-radio support.
Enables esp-radio-rtos-driver
- alloc esp-alloc? esp-radio?
-
Not documented because we don't currently expose anything that requires alloc, but isn't related to esp-radio.
TODO: make this public once we actually have alloc-based APIs.Enables allocator-api2 ^0.3.0 and esp-radio-rtos-driver
allocator-api2:
Unstable dependencies that are not (strictly) part of the public API
- esp-alloc = alloc
-
Enable the use of the
esp-alloccrate for dynamic memory allocation.Memory allocation is required by
esp-radio. If you choose to not enable this feature, you need to provide implementations for the following functions:pub extern "C" fn malloc_internal(size: usize) -> *mut u8pub extern "C" fn free_internal(ptr: *mut u8)
Note that the untyped nature of the allocator functions means that esp-alloc is likely the more memory efficient option.
Enables esp-alloc
- rtos-trace
-
Enable
rtos-tracesupport.Enables rtos-trace
Affects
esp-rtos::TraceEvents… - esp32
-
Chip selection
One of the following features must be enabled to select the target chip:
Enables esp32 of esp-hal and esp-metadata-generated
- esp32c2
-
Enables esp32c2 of esp-hal and esp-metadata-generated
- esp32c3
-
Enables esp32c3 of esp-hal and esp-metadata-generated
- esp32c6
-
Enables esp32c6 of esp-hal and esp-metadata-generated
- esp32h2
-
Enables esp32h2 of esp-hal and esp-metadata-generated
- esp32s2
-
Enables esp32s2 of esp-hal and esp-metadata-generated
- esp32s3
-
Enables esp32s3 of esp-hal and esp-metadata-generated
- log-04
-
Logging Feature Flags
Enable logging output using version 0.4 of the
logcrate. - defmt
-
Enable logging output using
defmtand implementdefmt::Formaton certain types.Enables defmt of esp-hal and defmt
Logging interfaces, they are mutually exclusive so they need to be behind separate features.