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

Can't find core #87

Closed madskjeldgaard closed 19 hours ago

madskjeldgaard commented 1 day ago

Hi friends

Thanks for making this amazing project. I am trying to get it running, and without having modified anything I get the following error about missing core.

I ran these commands to set up development:

rustup target install thumbv6m-none-eabi
cargo install flip-link
# Installs the probe-rs tools, including probe-rs run, our recommended default runner
cargo install --locked probe-rs-tools
# If you want to use elf2uf2-rs instead, do...
cargo install --locked elf2uf2-rs

But still it can't find the core:

cargo run                        
   Compiling nb v1.1.0
   Compiling void v1.0.2
   Compiling vcell v0.1.3
   Compiling bare-metal v0.2.5
   Compiling byteorder v1.5.0
   Compiling stable_deref_trait v1.2.0
   Compiling bitfield v0.13.2
   Compiling defmt-macros v0.3.9
warning: the `-Cinline-threshold` flag is deprecated and does nothing (consider using `-Cllvm-args=--inline-threshold=...`)
warning: the `-Cinline-threshold` flag is deprecated and does nothing (consider using `-Cllvm-args=--inline-threshold=...`)
warning: the `-Cinline-threshold` flag is deprecated and does nothing (consider using `-Cllvm-args=--inline-threshold=...`)
warning: the `-Cinline-threshold` flag is deprecated and does nothing (consider using `-Cllvm-args=--inline-threshold=...`)
warning: the `-Cinline-threshold` flag is deprecated and does nothing (consider using `-Cllvm-args=--inline-threshold=...`)

warning: the `-Cinline-threshold` flag is deprecated and does nothing (consider using `-Cllvm-args=--inline-threshold=...`)

warning: the `-Cinline-threshold` flag is deprecated and does nothing (consider using `-Cllvm-args=--inline-threshold=...`)

   Compiling frunk_proc_macro_helpers v0.1.3
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`

libunwind: malformed __unwind_info at 0x18D270CA8 bad second level pagecell, bare-metal, stable_deref_trait, byteorder, frunk_proc_macro_...
libunwind: malformed __unwind_info at 0x18D270CA8 bad second level page
libunwind: malformed __unwind_info at 0x18D270CA8 bad second level page
error: could not compile `nb` (lib) due to 1 previous error

Caused by:
  process didn't exit successfully: `rustc --crate-name nb --edition=2018 /Users/mads/.cargo/registry/src/index.crates.io-6f17d22bba15001f/nb-
1.1.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=142 --crate-type lib --emit=
dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2 -C debug-assertions=on --check-cfg 'cfg(docsrs)' -
-check-cfg 'cfg(feature, values("defmt-0-3"))' -C metadata=60910a4bbc1b44bb -C extra-filename=-60910a4bbc1b44bb --out-dir '/Users/mads/code/01
 projects/harmonikon/target/thumbv6m-none-eabi/debug/deps' --target thumbv6m-none-eabi -L 'dependency=/Users/mads/code/01 projects/harmonikon/
target/thumbv6m-none-eabi/debug/deps' -L 'dependency=/Users/mads/code/01 projects/harmonikon/target/debug/deps' --cap-lints allow -C linker=fl
ip-link -C link-arg=--nmagic -C link-arg=-Tlink.x -C link-arg=-Tdefmt.x -C inline-threshold=5 -C no-vectorize-loops` (signal: 10, SIGBUS: acce
ss to undefined memory)
warning: build failed, waiting for other jobs to finish...
error: could not compile `byteorder` (lib) due to 1 previous error

Caused by:
  process didn't exit successfully: `rustc --crate-name byteorder --edition=2021 /Users/mads/.cargo/registry/src/index.crates.io-6f17d22bba150
01f/byteorder-1.5.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=142 --crate-ty
pe lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2 -C debug-assertions=on --check-cfg '
cfg(docsrs)' --check-cfg 'cfg(feature, values("default", "i128", "std"))' -C metadata=4e95e51240e6112b -C extra-filename=-4e95e51240e6112b --o
ut-dir '/Users/mads/code/01 projects/harmonikon/target/thumbv6m-none-eabi/debug/deps' --target thumbv6m-none-eabi -L 'dependency=/Users/mads/c
ode/01 projects/harmonikon/target/thumbv6m-none-eabi/debug/deps' -L 'dependency=/Users/mads/code/01 projects/harmonikon/target/debug/deps' --c
ap-lints allow -C linker=flip-link -C link-arg=--nmagic -C link-arg=-Tlink.x -C link-arg=-Tdefmt.x -C inline-threshold=5 -C no-vectorize-loops
` (signal: 10, SIGBUS: access to undefined memory)
error: could not compile `stable_deref_trait` (lib) due to 1 previous error

Caused by:
  process didn't exit successfully: `rustc --crate-name stable_deref_trait --edition=2015 /Users/mads/.cargo/registry/src/index.crates.io-6f17
d22bba15001f/stable_deref_trait-1.2.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-wi
dth=142 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2 -C debug-assertion
s=on --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("alloc", "default", "std"))' -C metadata=9d3865bdd9313019 -C extra-filename=-9
d3865bdd9313019 --out-dir '/Users/mads/code/01 projects/harmonikon/target/thumbv6m-none-eabi/debug/deps' --target thumbv6m-none-eabi -L 'depen
dency=/Users/mads/code/01 projects/harmonikon/target/thumbv6m-none-eabi/debug/deps' -L 'dependency=/Users/mads/code/01 projects/harmonikon/tar
get/debug/deps' --cap-lints allow -C linker=flip-link -C link-arg=--nmagic -C link-arg=-Tlink.x -C link-arg=-Tdefmt.x -C inline-threshold=5 -C
 no-vectorize-loops` (signal: 10, SIGBUS: access to undefined memory)
libunwind: malformed __unwind_info at 0x18D270CA8 bad second level page
libunwind: malformed __unwind_info at 0x18D270CA8 bad second level page, bare-metal, frunk_proc_macro_helpers                               
error: could not compile `void` (lib) due to 1 previous error

Caused by:
  process didn't exit successfully: `rustc --crate-name void --edition=2015 /Users/mads/.cargo/registry/src/index.crates.io-6f17d22bba15001f/v
oid-1.0.2/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=142 --crate-type lib --e
mit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2 -C debug-assertions=on --check-cfg 'cfg(docsrs
)' --check-cfg 'cfg(feature, values("default", "std"))' -C metadata=64fa5961f02fc82e -C extra-filename=-64fa5961f02fc82e --out-dir '/Users/mad
s/code/01 projects/harmonikon/target/thumbv6m-none-eabi/debug/deps' --target thumbv6m-none-eabi -L 'dependency=/Users/mads/code/01 projects/ha
rmonikon/target/thumbv6m-none-eabi/debug/deps' -L 'dependency=/Users/mads/code/01 projects/harmonikon/target/debug/deps' --cap-lints allow -C 
linker=flip-link -C link-arg=--nmagic -C link-arg=-Tlink.x -C link-arg=-Tdefmt.x -C inline-threshold=5 -C no-vectorize-loops` (signal: 10, SIG
BUS: access to undefined memory)
libunwind: malformed __unwind_info at 0x18D270CA8 bad second level page
error: could not compile `bare-metal` (lib) due to 1 previous error

Caused by:
libunwind: malformed __unwind_info at 0x18D270CA8 bad second level page
  process didn't exit successfully: `rustc --crate-name bare_metal --edition=2015 /Users/mads/.cargo/registry/src/index.crates.io-6f17d22bba15
001f/bare-metal-0.2.5/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=142 --crate-
type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2 -C debug-assertions=on --cfg 'feat
ure="const-fn"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("const-fn"))' -C metadata=2656d2bc14c7aece -C extra-filename=-2656d
2bc14c7aece --out-dir '/Users/mads/code/01 projects/harmonikon/target/thumbv6m-none-eabi/debug/deps' --target thumbv6m-none-eabi -L 'dependenc
y=/Users/mads/code/01 projects/harmonikon/target/thumbv6m-none-eabi/debug/deps' -L 'dependency=/Users/mads/code/01 projects/harmonikon/target/
debug/deps' --cap-lints allow -C linker=flip-link -C link-arg=--nmagic -C link-arg=-Tlink.x -C link-arg=-Tdefmt.x -C inline-threshold=5 -C no-
vectorize-loops` (signal: 10, SIGBUS: access to undefined memory)
error: could not compile `bitfield` (lib) due to 1 previous error

Caused by:
  process didn't exit successfully: `rustc --crate-name bitfield --edition=2015 /Users/mads/.cargo/registry/src/index.crates.io-6f17d22bba1500
1f/bitfield-0.13.2/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=142 --crate-typ
e lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2 -C debug-assertions=on --check-cfg 'c
fg(docsrs)' --check-cfg 'cfg(feature, values())' -C metadata=2e86b2f458ea2976 -C extra-filename=-2e86b2f458ea2976 --out-dir '/Users/mads/code/
01 projects/harmonikon/target/thumbv6m-none-eabi/debug/deps' --target thumbv6m-none-eabi -L 'dependency=/Users/mads/code/01 projects/harmoniko
n/target/thumbv6m-none-eabi/debug/deps' -L 'dependency=/Users/mads/code/01 projects/harmonikon/target/debug/deps' --cap-lints allow -C linker=
flip-link -C link-arg=--nmagic -C link-arg=-Tlink.x -C link-arg=-Tdefmt.x -C inline-threshold=5 -C no-vectorize-loops` (signal: 10, SIGBUS: ac
cess to undefined memory)
error: could not compile `vcell` (lib) due to 1 previous error

Caused by:
  process didn't exit successfully: `rustc --crate-name vcell --edition=2015 /Users/mads/.cargo/registry/src/index.crates.io-6f17d22bba15001f/
vcell-0.1.3/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=142 --crate-type lib -
-emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C debuginfo=2 -C debug-assertions=on --check-cfg 'cfg(docs
rs)' --check-cfg 'cfg(feature, values("const-fn"))' -C metadata=beeeff6e7252bb74 -C extra-filename=-beeeff6e7252bb74 --out-dir '/Users/mads/co
de/01 projects/harmonikon/target/thumbv6m-none-eabi/debug/deps' --target thumbv6m-none-eabi -L 'dependency=/Users/mads/code/01 projects/harmon
ikon/target/thumbv6m-none-eabi/debug/deps' -L 'dependency=/Users/mads/code/01 projects/harmonikon/target/debug/deps' --cap-lints allow -C link
er=flip-link -C link-arg=--nmagic -C link-arg=-Tlink.x -C link-arg=-Tdefmt.x -C inline-threshold=5 -C no-vectorize-loops` (signal: 10, SIGBUS:
 access to undefined memory)

I am on MacOS by the way :)

madskjeldgaard commented 19 hours ago

I solved this by uninstalling homebrew rust and reinstalling via the official rustup method.