esp-rs / std-training

Embedded Rust on Espressif training material.
https://esp-rs.github.io/std-training
Apache License 2.0
590 stars 75 forks source link

Troubleshooting #260

Open newcomertv opened 2 months ago

newcomertv commented 2 months ago

I've been trying to figure out what I'm doing wrong for a while. While attempting to do so I came across this book where looking to fix or explain why this is an issue seems to be in scope. Is this the right place?

rustup +nightly-2024-06-30 target add riscv32imc-esp-espidf error: toolchain 'nightly-2024-06-30-x86_64-unknown-linux-gnu' does not support target 'riscv32imc-esp-espidf' note: you can see a list of supported targets with rustc --print=target-list note: if you are adding support for a new target to rustc itself, see https://rustc-dev-guide.rust-lang.org/building/new-target.html

Given how well the rest of it all works I am surprised this part doesn't work as I would expect. Is this an expected issue because you can't add a Tier 3 target over rustup? I though Tier 3 meant the target might not exist but since the nightly version is specified in the book I don't see how this is the case here.

Vollbrecht commented 2 months ago

For general question's feel free to join the matrix chat

Can you clarify what your actual problem is? You did follow either a) what is mention in this chapter in the book or b) what is mention in the rust on esp book

and you can not get passed the point off adding the esp32c3 riscv32imc-esp-idf target to your already installed rustc nightly toolchain?

what is the output of rustup show ?

newcomertv commented 2 months ago

Thanks for the kind reply.

If it's preferred in the matrix/ not on topic for std-training I can move this to the matrix. I thought an issue is something easier to find if someone else has the same problem :)

I followed the std-training book last as it seemed to be the most recently updated.

`$ rustup show Default host: x86_64-unknown-linux-gnu rustup home: /home/\/.rustup

installed toolchains

stable-x86_64-unknown-linux-gnu (default) beta-x86_64-unknown-linux-gnu nightly-2022-02-24-x86_64-unknown-linux-gnu nightly-2023-08-19-x86_64-unknown-linux-gnu nightly-2023-08-25-x86_64-unknown-linux-gnu nightly-2024-05-02-x86_64-unknown-linux-gnu nightly-2024-06-30-x86_64-unknown-linux-gnu nightly-x86_64-unknown-linux-gnu 1.63.0-x86_64-unknown-linux-gnu 1.65.0-x86_64-unknown-linux-gnu 1.70.0-x86_64-unknown-linux-gnu esp

installed targets for active toolchain

riscv32imac-unknown-none-elf riscv32imc-unknown-none-elf x86_64-unknown-linux-gnu x86_64-unknown-linux-musl

active toolchain

stable-x86_64-unknown-linux-gnu (default) rustc 1.79.0 (129f3b996 2024-06-10)

`

I remember a year ago the process to getting a properly configured environment for esp was way harder than it is supposed to be according to the docs today.

After rebooting between yesterday and today :

$ rustup target list | grep idf

Yields no result, I'm 99.99% certain yesterday it found all the idf triples.

Now the above error message makes way more sense. ( I have tried setting my default toolchain to the nightly specified in the std-training book)

PS: before coming here I checked the rust on esp book and a bunch of other places as well, I don't remember all of the ressources I tried :/

Vollbrecht commented 2 months ago

We clarified in the matrix chat that he has a working rust compiler version installed.

This 4 steps let to him to test out that he had a working env.

SergioGasquez commented 2 months ago

You dont need to install the target with rustup +nightly-2024-06-30 target add riscv32imc-esp-espidf. Have you tried building a project as @Vollbrecht suggested? You could also use the intro/hardware-check project, even if you dont have the specific nightly channel it should be downloaded with the rust-src component as it has a rust-toolchain.toml