-
Notifications
You must be signed in to change notification settings - Fork 53
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
std-template not compiling/core crate not found #239
Comments
I found out more information about this issue. If I create a template for the c6 processor it doesn't find the core crate but for the default esp32 processor rustc fails to compile as llvm doesn't find the triplet |
So trying to compile for the c6 processor with the master branch of the template or the 5.1 version doesn't work either and spits out the same "crate core not found" error |
It works with dev containers but is a lot slower as I'm on an m2 processor so the container needs to be emulated 🫠 |
what is the output of |
In general if you are not specifying a toolchain manually, we always use the toolchain that is specified inside the |
Crates For this to happen, you must have a properly configured Further, you should either use rust "nightly" ( |
I also suggest you read the README of this project carefully, top to bottom and make sure you applied have all steps, and nothing more. For example, don't try to be adventurous by installing and activating ESP-IDF yourself. This is possible, but is an advanced configuration better avoided initially. |
@Vollbrecht
and I didn't specify any toolchain myself and relied on the template itself to work as it did in the past |
@ivmarkov I'm aware they arent shipped pre compiled, by not found/available I meant that the rust compiler literally said "can't find crate for [build]
target = "riscv32imac-esp-espidf"
[target.riscv32imac-esp-espidf]
linker = "ldproxy"
runner = "espflash flash --monitor --baud 460800"
rustflags = [ "--cfg", "espidf_time64"]
[unstable]
build-std = ["std", "panic_abort"]
[env]
MCU="esp32c6"
ESP_IDF_VERSION = "v5.2.2"
CRATE_CC_NO_DEFAULTS = "1" I also did use espup like I did in the past and it always worked until it magically didn't anymore. I updated nothing regarding espup and just opened the project and tried to flash my esp32-c6 but then it complained it can't find the crate core all of the sudden which it didn't the week prior. Switching the toolchain nightly also changed nothing sadly I also didn't install esp-idf myself for development with rust, I actually did so with the python scripts provided by their devs and had to do so as I was programming in a c++ codebase for a bit but as I stated, that never effected anything for over a year so that shouldn't be an issue. I already read through all the prerequisites and how to use this template with cargo generate and tried it multiple times but never could get it to build |
OK but apparently you have something miscondigured on _your machine, or else how would you explain that it does not even attempt to compile Do you have any |
You have this:
In other words, you would be using nightly for this project, no matter what. The README is pretty clear, that you do need the |
But that's literally the template that specifies nightly, I didn't touch the rust-toolchain.toml file. |
I tried changing the channel in the toolchain file to esp instead of nightly but same issue. I'm pretty confused what changed cause as I mentioned it did work just fine roughly 2 weeks ago and around 1 week ago it just didn't compile anymore and I mean it when I say I didn't touch anything in that project or even touched rust for that week or updated any of the programs used with rust development. |
how do I like uninstall everything related to esp rust development so I can start from new installing all the dependencies and stuff and basically start from a clean slate? Maybe that's like my best option cause I through the esp rs book so many times and I just generated the template and it doesn't work and it used to always work |
Did you read this? |
Not in my fish config and the only rust flag I can think of is the one in the .cargo config
I'm unsure if I added that, I can't remember if it was a different project I had to add a rustflag like that |
Just checked, that's in the template too |
Ohh and ye the RUSTFLAGS variable in the terminal is not set, sorry I didnt add that |
Is there any other way I can like show all the rust flags that the compiler would use in a given directory? |
|
Sorry I'm still learning
|
Bug description
I generated a fresh esp-idf template project with the command
cargo generate esp-rs/esp-idf-template cargo
and it doesn't build. I get this errorI have an existing project that "compiles" but gets stuck on the core crate as it apparently does not exist.
As a side note, it worked perfectly fine before for months and suddenly it stopped compiling and I got the second error. I tried creating new template projects and I got the same error at first but then I went through the entire book again to install everything from scratch and checked the links in the bug issue template. Nothing seemed to work.
No as I don't know what's causing it
To Reproduce
Steps to reproduce the behavior:
Likely not reproducible but I'll try :)
cargo generate esp-rs/esp-idf-template cargo
cargo build
Creating a project from the master branch also doesn't build for me
Have it build the template like before
Additional context
I tried installing everything like 10 times already so that may've bricked something... I also did work with an esp-idf project (not rust) one like exactly 1 year ago~ and it has worked afterwards regardless of it and just now broke but maybe it has to do something with it
The text was updated successfully, but these errors were encountered: