Compilation error of Rust program on STM Discovery board

**

Trying to compile Rust program on STM Discovery board and getting error as mentioned


in attached file

**
**

How to fix this error

**

It seems like your importing the runtime twice. Could you list your dependencies?

**

The screenshot of "Cargo.toml" file is attached.

**

Updated the Cargo & rustup and the recompiled. It has compiled successfully. Snap shot is attached.


.

Aah cool, in that case it's possible that you pulled in 2 different versions of cortex_m_rt. This crate uses some unmangled symbols and if they are present twice then the linker will complain. Doing a cargo update (you need to do cargo install cargo-edit first I think) is always worth a try.

I can now try examples from the Rust embedded book. Thanks for your help.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.