esp-rs / esp-openthread

40 stars 4 forks source link

Issue with critical #7

Open cchance27 opened 5 months ago

cchance27 commented 5 months ago

When i try to import this as a dependency to play with i get the error below, just wondering if you had any tips as i'm new to ESP programming and this library.

Compiling critical-section v1.1.2
error: You must set at most one of these Cargo features: restore-state-none, restore-state-bool, restore-state-u8, restore-state-u16, restore-state-u32, restore-state-u64
  --> /Users/cc/.cargo/registry/src/index.crates.io-6f17d22bba15001f/critical-section-1.1.2/src/lib.rs:64:1
   |
64 | compile_error!("You must set at most one of these Cargo features: restore-state-none, restore-state-bool, restore-state-u8, restore-state-u16, restore-state-u32, restore-state-u64..."

i'm importing it like...

esp-openthread = { git = "https://github.com/esp-rs/esp-openthread.git", branch = "update-esp-hal-0.16.1", features = ["esp32h2"] }
bjoernQ commented 5 months ago

You will need the HAL and some other dependencies, too:

e.g. https://github.com/esp-rs/esp-openthread/blob/760950c41b5cc071938f685e435b7c62ea371640/examples-esp32c6/Cargo.toml#L12-L19

There is a PR to get this to use the currently released HAL here: https://github.com/esp-rs/esp-openthread/pull/6/files#diff-685817f10569a9c56a23757a25209b7ba447bc9c7541e8a9c5fb39bef4e8f64d