gpt4 book ai didi

rust - 错误[E0463] : can't find crate for `core` note: the `thumbv7m-none-eabi` target may not be installed

转载 作者:行者123 更新时间:2023-12-05 03:50:04 26 4
gpt4 key购买 nike

我正在尝试使蓝药丸(ARM STM32)上的 LED 闪烁,并按照此 tutorial 中的说明进行操作,但是当我尝试编译代码时遇到了这个错误。我用的是 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

是否依赖于 ./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)
$ 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

它是否取决于“Cargo.toml”文件中的名称?我做错了什么?

最佳答案

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

关于rust - 错误[E0463] : can't find crate for `core` note: the `thumbv7m-none-eabi` target may not be installed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63663245/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com