Open SilvanRehm opened 1 year ago
When splittign GPIO you do need to pass through &mut rcc.apb2
I think its a new parameter of the API
Hey! I had this same issue. the dependencies in cargo.toml
are out of date. I fixed mine by just going through the dependency crates and manually checking their latest version on crates.io and updating them. I think just the cortex-m
and cortex-m-rt
are necessary in order for it to compile, but here's the entire dependency list from my example, at the time of writing:
[dependencies]
embedded-hal = "0.2.7"
nb = "1.0.0"
cortex-m = "0.7.6"
cortex-m-rt = "0.7.2"
panic-halt = "0.2.0"
Hope this helps!
I used this method to solve it. Attach the dependencies in my file.
[dependencies] embedded-hal = "0.2.7" nb = "1.1.0" cortex-m = "0.7.7" cortex-m-rt = "0.7.3" panic-halt = "0.2.0" [dependencies.stm32f1xx-hal] version = "0.10.0" features = ["rt", "stm32f103", "medium"]
I just started with rust, the first example I tried was https://jonathanklimt.de/electronics/programming/embedded-rust/rust-on-stm32-2/ which worked. Next I wanted to test CANBus, which I could not get running. So I tried the blinky as in the readme first. But it won't build. Here's the output: (Details how I set up the project below)
Here's what I did:
paste
into .cargo/config
paste
into memory.x
my Cargo.toml:
copy blinky.rs example into src/main.rs: