Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Troubleshooting #260

Open
newcomertv opened this issue Jul 2, 2024 · 4 comments
Open

Troubleshooting #260

newcomertv opened this issue Jul 2, 2024 · 4 comments

Comments

@newcomertv
Copy link

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
Copy link
Contributor

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
Copy link
Author

newcomertv commented Jul 3, 2024

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/<my-user>/.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
Copy link
Contributor

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.

  • run rustup toolchain install nightly-2024-06-30 --component rust-src

  • create a new default hello-world test project with the esp-idf-template via cargo generate esp-rs/esp-idf-template cargo for his riscv target

  • changed the rust-toolchain.toml to use nightly-2024-06-30 instead of nightly

  • run cargo build

@SergioGasquez
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

3 participants