can't find crate for core
#538
-
I get this error when trying to compile: Working with freshly generated project, using cargo-generate and provided template. Any help would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 12 comments
-
On Wed, Apr 17, 2024 at 11:41:33AM -0700, Kacper Cholewiński wrote:
I get this error when trying to compile:
error[E0463]: can't find crate for `core`
|
= note: the `avr-atmega328p` target may not be installed
= help: consider downloading the target with `rustup target add avr-atmega328p`
Working with freshly generated project, using cargo-generate and provided template.
`rustup target add avr-atmega328p`
Any help would be appreciated.
Provide feedback
|
Beta Was this translation helpful? Give feedback.
-
Well, every avr target is custom made json, so it doesn't work with |
Beta Was this translation helpful? Give feedback.
-
Hm, not finding core sounds like avr-hal/examples/arduino-uno/.cargo/config.toml Lines 9 to 10 in 7f7d0a5 This tells cargo to build What version of |
Beta Was this translation helpful? Give feedback.
-
And I would like to known additional information how to reproduce the error. Not for the error, but for solving the error. |
Beta Was this translation helpful? Give feedback.
-
There is
There is not much to reproduce - I generated new project from template, for Arduino Uno, and used There is one thing that could be significant - I recently cleared my PATH env variable by accident, but I added .../.cargo/bin back, and it still doesn't work. Maybe there is some other path that I should add there again? |
Beta Was this translation helpful? Give feedback.
-
Hmm, can these numbers don't quite add up... Did you run all the |
Beta Was this translation helpful? Give feedback.
-
Yep.
Well, it looks like rustc and cargo show latest stable release version, but below you can see that
Here you go:
|
Beta Was this translation helpful? Give feedback.
-
I'd expect to see this:
Are you sure your rustc +nightly-2024-03-22 --version work or do you get an error? |
Beta Was this translation helpful? Give feedback.
-
Well, this is weird... |
Beta Was this translation helpful? Give feedback.
-
My best guess is that your rustup installation is broken in some way... Maybe delete all toolchains, reinstall rustup, and see if the problem persists. Or ask rustup upstream about it... |
Beta Was this translation helpful? Give feedback.
-
Well, I did it, and everything works now. Thanks for all your help, I appreciate it. |
Beta Was this translation helpful? Give feedback.
-
And thank you for the provided feedback. What about closing this issue? If it should remain open, express for which reason. Karma bonus points for "comment and close" with a text like:
|
Beta Was this translation helpful? Give feedback.
My best guess is that your rustup installation is broken in some way... Maybe delete all toolchains, reinstall rustup, and see if the problem persists. Or ask rustup upstream about it...