Can't find core , the `thumbv7m-none-eabi` target may not be installed

Hi guys ,
I am using Rust for embedded applications and am following this tutorial Rust-embedded .
I am using Ubuntu and have installed thumbv7-none-eabi target using rustup .
When I build the example project I get following errors .

Compiling semver-parser v0.7.0
Compiling typenum v1.11.2
Compiling proc-macro2 v1.0.9
Compiling unicode-xid v0.2.0
Compiling syn v1.0.16
Compiling stable_deref_trait v1.1.1
Compiling vcell v0.1.2
Compiling cortex-m v0.6.2
error[E0463]: can't find crate for `core`
|
= note: the `thumbv7m-none-eabi` target may not be installed

However, when I do rustup target add thumbv7m-none-eabi I get the message that it is up to date .
What am I doing wrong ?

Type rustup show in the crate directory

@jethrogb,

Default host: x86_64-unknown-linux-gnu
installed toolchains
--------------------

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

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

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

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

nightly-x86_64-unknown-linux-gnu (default)
rustc 1.43.0-nightly (75cf41afb 2020-03-04)

To answer my own question,
I had installed rustup via snap in Ubuntu , so it was in /snap/bin while rustc , rust-gdb were installed in /usr/bin .
According to this installation tutorial , https://www.rust-lang.org/tools/install all the software was supposed to be in ~/.cargo/bin which only had cargo and rust-fmt .
So I manually deleted all rust related things from /snap/bin . Did sudo apt remove rustc rust-gdb . Also , I removed ~/.cargo/ .
Then I followed the installation tutorial . Chose the stable installation.
Finally I added the target , rustup add target thumbv7m-none-eabi and all went well :grinning:

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.