Bug description
When I enable ULP support in the sdkconfig, compilation fails due to missing imports and lifetimes:
error[E0726]: implicit elided lifetime not allowed here
--> /home/michal/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/esp-idf-hal-0.46.2/src/ulp.rs:330:6
|
330 | impl ULP {
| ^^^ expected lifetime parameter
|
help: indicate the anonymous lifetime
|
330 | impl ULP<'_> {
| ++++
error[E0425]: cannot find type `PhantomData` in this scope
--> /home/michal/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/esp-idf-hal-0.46.2/src/ulp.rs:75:26
|
75 | pub struct UlpDriver<'d>(PhantomData<&'d mut ()>);
| ^^^^^^^^^^^ not found in this scope
|
= note: struct `crate::temp_sensor::config::PhantomData` exists but is inaccessible
help: consider importing this struct
|
1 + use std::marker::PhantomData;
|
error[E0425]: cannot find value `PhantomData` in this scope
--> /home/michal/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/esp-idf-hal-0.46.2/src/ulp.rs:93:17
|
93 | Ok(Self(PhantomData))
| ^^^^^^^^^^^ not found in this scope
|
= note: unit struct `crate::temp_sensor::config::PhantomData` exists but is inaccessible
help: consider importing this unit struct
|
1 + use std::marker::PhantomData;
|
Some errors have detailed explanations: E0425, E0726.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `esp-idf-hal` (lib) due to 3 previous errors
I encountered this while attempting to migrate our old IDF v5.2.2 + esp-idf-svc v0.51.0 project to IDF v5.5.3 + esp-idf-svc v0.52.1, however, this also occurs on a fresh template generated by esp-idf-template.
To Reproduce
- Generate an empty template with esp-idf-template, select esp32s3, IDF version 5.5.3, IDF install dir "workspace", do not use latest Git versions of esp-idf-* creates.
- Add the following to
sdkconfig.defaults:
CONFIG_ULP_COPROC_ENABLED=y
CONFIG_ULP_COPROC_TYPE_RISCV=y
cargo build.
Expected behavior
Compilation should not fail.
Environment
- Crate (
esp-idf-hal) version: v0.46.2
- ESP-IDF branch or tag: v5.5.3
- Target device (MCU): esp32s3
- OS: Arch Linux
- Rust toolchain: rustc 1.96.0-nightly (208740b4f 2026-05-27) (1.96.0.0), installed via espup
Bug description
When I enable ULP support in the sdkconfig, compilation fails due to missing imports and lifetimes:
I encountered this while attempting to migrate our old IDF v5.2.2 + esp-idf-svc v0.51.0 project to IDF v5.5.3 + esp-idf-svc v0.52.1, however, this also occurs on a fresh template generated by esp-idf-template.
To Reproduce
sdkconfig.defaults:cargo build.Expected behavior
Compilation should not fail.
Environment
esp-idf-hal) version: v0.46.2