我试图让 bluepill(arm STM32)上的 LED 闪烁并按照本教程中的说明进行操作,但是当我尝试编译代码时遇到此错误。我用的是ubuntu。
我刚刚安装了 Rust / Cargo,如教程中所示。我安装了stlink,我对 Rust、Cargo 或 Bluepil 没有经验。
$ cargo build --release:
error[E0463]: can't find crate for `core`
|
= note: the `thumbv7m-none-eabi` target may not be installed
Run Code Online (Sandbox Code Playgroud)
它依赖于 ./cargo/config 文件吗?
$ 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)
Run Code Online (Sandbox Code Playgroud)
$ 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
Run Code Online (Sandbox Code Playgroud)
$ 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
Run Code Online (Sandbox Code Playgroud)
它取决于“Cargo.toml”文件中的名称吗?我究竟做错了什么?
| 归档时间: |
|
| 查看次数: |
3071 次 |
| 最近记录: |