3

I'm trying to blink the led on a bluepill (arm STM32) and followed the instructions from this tutorial, but i run into this error when i try to compile the code. i use ubuntu.

i just installed rust / cargo as figured in the tutorial. i have stlink installed, i have no experience with rust, cargo or bluepil.

$ cargo build --release:

        error[E0463]: can't find crate for `core`
      |
      = note: the `thumbv7m-none-eabi` target may not be installed

does it depend on the ./cargo/config file?

$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/marco/snap/rustup/common/rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu

installed targets for active toolchain
--------------------------------------

thumbv7m-none-eabi
x86_64-unknown-linux-gnu

active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
rustc 1.46.0 (04488afe3 2020-08-24)
$ rustup target add thumbv7em-none-eabi
info: downloading component 'rust-std' for 'thumbv7em-none-eabi'
info: installing component 'rust-std' for 'thumbv7em-none-eabi'
info: Defaulting to 500.0 MiB unpack ram
$ cargo build --release
   Compiling semver-parser v0.7.0
   Compiling typenum v1.12.0
   Compiling proc-macro2 v1.0.19
   Compiling unicode-xid v0.2.1
   Compiling syn v1.0.39
   Compiling stable_deref_trait v1.2.0
error[E0463]: can't find crate for `core`
  |
  = note: the `thumbv7m-none-eabi` target may not be installed

Does it depend on the name in the "Cargo.toml" file? What am i doing wrong?

6

1 Answer 1

5
export PATH="$HOME/.cargo/bin:$PATH"
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.