ivmarkov / rust-esp32-std-demo

Rust on ESP32 STD demo app. A demo STD binary crate for the ESP32[XX] and ESP-IDF, which connects to WiFi, Ethernet, drives a small HTTP server and draws on a LED screen.
Apache License 2.0
785 stars 105 forks source link

Build issue #155

Closed yashwanthsinghm closed 10 months ago

yashwanthsinghm commented 10 months ago

After following steps given in readme getting this issue when im trying to build the project.


error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names --cfg espidf_time64 --target xtensa-esp32-espidf --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit code: 1)
  --- stderr
  error: Error loading target specification: Could not find specification for target "xtensa-esp32-espidf". Run `rustc --print target-list` for a list of built-in targets```
ivmarkov commented 10 months ago

You have not installed the espup toolchain, and you don't have a rustc compiler which can compile for xtensa. Or, you did it, but you have something which overrides your rust toolchain, so you end up with the stock rustc compiler - be it stable or nightly.

yashwanthsinghm commented 10 months ago

I have been working on esp nostd hal for a while now so everything is installed up to date, when I try to build this project I'm getting the issue.

ivmarkov commented 10 months ago

rustup default esp

... or to check what is the current active toolchain: rustup show

Google a bit and try to learn how rustup and rutsc operate w.r.t. toolchains. Also don't forget before compiling to do . ~/export-esp.sh (hopefully that second sourcing step will disappear in the coming months).

I get it that the easiest is to just open a bug here, but you can't imagine what an overhead that is for me.