espup
espup copied to clipboard
espup installed, but no xtensa target available
Bug description
When I run rustc --print target-list
, no xtensa target is shown. Furthermore, when I try to build this demo project using the command cargo build
, then it fails saying that no xtensa-esp32-espidf
target is found.
To Reproduce
-
espup
tool installed using the commandcargo install espup
, -
espup
tool is stored in ".cargo/bin" directory but not in "PATH" env var by default, -
espup install
command used, -
source export-esp.sh
done.
Expected behavior
Being able to compile this code, and flash it on ESP32-WROOM32 chip.
Environment
- OS: archinux
- espup version: 0.2.3
Hi @Apitronix! It looks like you are not using the proper channel. Are you overriding the esp
toolchain? You should probably use rustc +esp --print target-list
or cargo +esp build
. See https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file for more information on toolchain overriding.
Hi @Apitronix, do you have any update?
Hi @SergioGasquez, I'm running into the same issue. When I run rustup toolchain list
, the output is
stable-aarch64-apple-darwin (default)
nightly-aarch64-apple-darwin
esp (override)
which implies that esp is the chosen toolchain. When I try to run rustup target list --installed
, I get
error: toolchain 'esp' does not support components: esp is a custom toolchain
When I try cargo +esp build
, I get
error: no such command: `+esp`
Cargo does not handle `+toolchain` directives.
Did you mean to invoke `cargo` through `rustup` instead?
(I don't know what invoking cargo through rustup means)
and when I try rustc +esp --print target-list
the error is
error: toolchain 'esp' does not support components: esp is a custom toolchain
I'm a bit stuck. I've followed the instructions from the README and the Rust on ESP book pretty closely. I'm trying to set up a project using the esp-rs/esp-idf-template
incuding the standard library, and one thing that confuses me is that the template's cargo.toml refers to the target as xtensa-esp32-espidf
whereas espup installs xtensa-esp-elf
.
Thanks for any help
How did you install Rust? Did you use any package manager? https://esp-rs.github.io/book/installation/rust.html
Also a good test would be invoking cargo with the full path: $HOME/.rustup/toolchains/esp/bin/cargo build
and one thing that confuses me is that the template's cargo.toml refers to the target as xtensa-esp32-espidf whereas espup installs xtensa-esp-elf
There are two different things,xtensa-esp32-espidf
is the Rust target triple while xtensa-esp-elf
is the GCC toolchain used for linking the project
Thanks for the tip. I installed Rust a few months ago so didn't remember, but I see it in brew list
, so that must be how I installed it. Will reinstall.