cancel
Showing results for 
Search instead for 
Did you mean: 

Issue to adapt code to make a simple blink led in stm32f469 disco with Rust

neuberfran
Associate III

Hi,

https://github.com/aholzbaur/rust-stm32f4-disco-blinky

I'm trying adapt code in link above to the code in the link below to make a simple blink led(In the case of the link below, the project adds a button). I'm getting the issues below. Any help from you is welcome:

https://dev.to/apollolabsbin/stm32f4-embedded-rust-at-the-hal-button-controlled-blinking-by-timer-polling-3bno

Compiling stm32f4xx-hal v0.11.1 error[E0432]: unresolved import `fugit` --> src/main.rs:6:5 | 6 | use fugit::{Duration, ExtU32}; | ^^^^^ use of undeclared crate or module `fugit` error[E0689]: can't call method `MHz` on ambiguous numeric type `{integer}` --> src/main.rs:20:37 | 20 | let clocks = rcc.cfgr.use_hse(8.MHz()).freeze(); | ^^^ | help: you must specify a concrete type for this numeric value, like `i32` | 20 | let clocks = rcc.cfgr.use_hse(8_i32.MHz()).freeze(); | ~~~~~ error[E0599]: no method named `counter_ms` found for struct `TIM1` in the current scope --> src/main.rs:40:31 | 40 | let mut counter = dp.TIM1.counter_ms(&clocks); | ^^^^^^^^^^ method not found in `TIM1` Some errors have detailed explanations: E0432, E0599, E0689. For more information about an error, try `rustc --explain E0432`. error: could not compile `rust-stm32f4-disco-blinky` due to 3 previous errors

 

issuestm32f469discoUsingRustissuestm32f469discoUsingRust

 

1 ACCEPTED SOLUTION
6 REPLIES 6
neuberfran
Associate III

Solved 10 percent of this issue with cargo add fugit command

Pavel A.
Evangelist III

> Any help from you is welcome 

Why from us, not from the author of github project?

I already tried contacting him (via x-twitter) with no response. Maybe I should try another way

Things get a bit rusty there? Consider applying a drop of oil ))

I ....