rp-rs / rp2040-project-template

A basic rp2040-hal project with blinky and rtt logging example code. With this you can quickly get started on a new rp2040 project
480 stars 98 forks source link

error[E0463]: can't find crate for `core` #81

Closed atkinson closed 2 months ago

atkinson commented 2 months ago

Hello - apologies if this isn't the right place, please redirect me if so.

I am trying to build the template project. I have installed all of the dependencies including, "rustup target add thumbv6m-none-eabi".

I'm getting this error - which seems to be due to the cross-compile?

Big G and SO haven't helped, and so I'd be grateful for a steer in the right direction.

thanks!

> cargo run                           
   Compiling proc-macro2 v1.0.86
   Compiling nb v1.1.0
   Compiling void v1.0.2
   Compiling vcell v0.1.3
   Compiling syn v1.0.109
   Compiling semver v0.9.0
   Compiling cortex-m v0.7.7
   Compiling cortex-m-rt v0.7.3
   Compiling proc-macro-error-attr v1.0.4
   Compiling thiserror v1.0.63
   Compiling proc-macro-error v1.0.4
   Compiling defmt v0.3.8
error[E0463]: can't find crate for `core`
  |
  = note: the `thumbv6m-none-eabi` target may not be installed
  = help: consider downloading the target with `rustup target add thumbv6m-none-eabi`

Just to confirm,

> rustup target add thumbv6m-none-eabi        
info: component 'rust-std' for target 'thumbv6m-none-eabi' is up to date

> rustup show
Default host: aarch64-apple-darwin
rustup home:  /Users/rich/.rustup

installed targets for active toolchain
--------------------------------------

aarch64-apple-darwin
thumbv6m-none-eabi

active toolchain
----------------

stable-aarch64-apple-darwin (default)
rustc 1.80.1 (3f5fd8dd4 2024-08-06)

System: Mac OS 14.5 with rust installed via homebrew.

Target: Pico Pi

9names commented 2 months ago

Mac OS 14.5 with rust installed via homebrew.

This is a problem with Rust installed via homebrew. The solution is to install rust from https://rustup.rs/

atkinson commented 2 months ago

thank you