Open eskorzon opened 11 months ago
I think I fixed my immediate problem by using the git repo as the dependency source, rather than the crate.io. I would say this should be left open since embassy-rs is not able to be used very effectively as an external dependency via the package manager, and the real fix to the problem is publishing it correctly on the package manager.
Minimum functioning example of blinky with Nucleo-32 with STM32L432KCU6: https://github.com/eskorzon/nucleo-32-rs
I still have this same issue
This was some time ago for me, but have you tried using the GitHub url in your cargo.toml? ‘’’ embassy-executor = { version = "0.3.3", git = "https://github.com/embassy-rs/embassy", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"]} embassy-stm32 = { version = "0.1.0", git = "https://github.com/embassy-rs/embassy", features = ["nightly", "defmt", "unstable-pac", "stm32l432kc", "memory-x", "time-driver-any", "exti", "unstable-traits", "chrono"] } embassy-time = { version = "0.1.5", git = "https://github.com/embassy-rs/embassy", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768", "unstable-traits", "nightly"] } ‘’’
So, IMHO the best way to manage embassy dependencies is using Cargo.toml patches as recommended by the documentation. With that approach, there are these things you need to make sure is correct:
rev
field.dependencies
section must match the version in embassy repo for that git revision, otherwise it will not patch it correctly.
I am having a very similar issue as this closed issue. I can compile and run the example blinky on my board when cloning embassy-rs and doing
cargo run --bin blinky --release
from inside the cloned repo. When I add it through cargo in a fresh repo I get problems:Here is the output from cargo tree:
Here is my .cargo/config.toml:
Here is my src/main.rs:
Here is my Cargo.toml:
Here is my memory.x:
Here is my rust-toolchain.toml:
I am using a STM32L432KCU6 for what it's worth.
The same code works when compiled from inside a cloned repo, but not when done through a fresh repo where embassy is a dependency. Can embassy be used as a dependency or must it always be used as a clone of this repo? Am I missing some piece of this repo without which nothing will compile correctly? I'm seeing that embassy-stm32 is version 0.1.0 inside this repo, but the oldest version on crates.io is 0.0.0. Could that be a factor?
Originally posted by @eskorzon in https://github.com/embassy-rs/embassy/issues/917#issuecomment-1817352649