Closed
Description
Environment
- IntelliJ Rust plugin version: 0.2.119.2172-193
- Rust toolchain version: nightly-x86_64-pc-windows-gnu (1.44.0)
- IDE name and version: CLion 2019.3
- Operating system:Windows 10 1909 x64
Problem description
The problem is that Intelij Rust
invokes cargo
with all-targets
which doesn't work well for certain targets. Building the project manually with cargo build
from the command line works just fine.
Somewhat related issues:
- no_std targets, can't find crate for
test
rust-lang/rls#1524 - Still getting 'can't find crate` error rust-lang/vscode-rust#579
- no_std Can't find crate for 'test' rust-lang/vscode-rust#729
Ref:
Compiling blinky v0.1.0 (D:\dev\projects\blinky)
error[E0463]: can't find crate for `test`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0463`.
error: could not compile `blinky`.
To learn more, run the command again with --verbose.
Steps to reproduce
- Have
nightly-x86_64-pc-windows-gnu
toolchain installed (refrustc 1.44.0-nightly (6dee5f112 2020-04-06
)) - Install target
thumbv7em-none-eabihf
. - Create directory
.cargo
and config file in subdirectory.
The config file in this case specifies the target (see below):
.cargo/config's contents:
[target.thumbv7em-none-eabihf]
rustflags = [
"-C", "link-arg=-Tlink.x",
]
[build]
target = "thumbv7em-none-eabihf"
- Use main.rs and cargo.toml contents from: https://gist.github.com/stianeklund/7965a4533f99bda2a7a92ab67b0baa56
Project was created from following steps at: https://github.com/stm32-rs/stm32f4xx-hal
Metadata
Metadata
Assignees
Labels
No labels