jasta / esp32-tokio-demo

Demo of tokio running on esp32 using esp-idf
MIT License
33 stars 5 forks source link

Compilation Fails #3

Open barafael opened 11 months ago

barafael commented 11 months ago

I'm getting a compile error when compiling this according to the instructions from the readme:

error[E0432]: unresolved import `core::sync::atomic::AtomicU64`
 --> /home/rafael/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-idf-hal-0.41.2/src/interrupt.rs:1:26
  |
1 | use core::sync::atomic::{AtomicU64, Ordering};
  |                          ^^^^^^^^^
  |                          |
  |                          no `AtomicU64` in `sync::atomic`
  |                          help: a similar name exists in the module: `AtomicU32`

For more information about this error, try `rustc --explain E0432`.
error: could not compile `esp-idf-hal` (lib) due to previous error
HenningHolmDE commented 10 months ago

I ran into the same error and managed to get around it by bumping some dependencies:

 [dependencies]
 esp-idf-sys = { version = "0.33.1", features = ["binstart"] }
-esp-idf-svc = { version = "0.46.0", features = ["experimental"] }
-esp-idf-hal = "0.41.2"
-embedded-svc = { version = "0.25.3", features = ["experimental"] }
+esp-idf-svc = { version = "0.47.3", features = ["experimental"] }
+esp-idf-hal = "0.42.5"
+embedded-svc = { version = "0.26.4", features = ["experimental"] }
 embedded-hal = "0.2.7"
 log = "0.4.17"
 anyhow = "1"

Afterwards, the demo ran sucessfully on my ESP32-C3-DevKit-RUST-1. :tada:

@jasta Thanks for making this possible! ❤️

jasta commented 10 months ago

If you throw up a PR I'm happy to merge it, otherwise I'll try to get to it next week, thanks!

HenningHolmDE commented 10 months ago

PR is ready.

The reason for the compilation error I found quite interesting, for reference see https://github.com/rust-lang/rust/issues/117305