riscv-rust / longan-nano

Board support package for the Longan Nano board
https://www.seeedstudio.com/Sipeed-Longan-Nano-RISC-V-GD32VF103CBT6-Development-Board-p-4205.html
117 stars 29 forks source link

Does not compile with the default stable toolchain #19

Closed hansfbaier closed 3 years ago

hansfbaier commented 3 years ago

When I tried to build as instructed with the stable toolchain, I got this:

$ cargo build --example blinky --release --all-features
    Updating crates.io index
  Downloaded riscv-target v0.1.2
  Downloaded riscv-rt v0.8.0
  Downloaded rand v0.5.6
  Downloaded nb v0.1.3
  Downloaded embedded-hal v0.2.4
  Downloaded cast v0.2.3
  Downloaded bit_field v0.10.1
  Downloaded riscv v0.6.0
  Downloaded nb v1.0.0
  Downloaded regex v1.4.3
  Downloaded vcell v0.1.3
  Downloaded proc-macro2 v0.4.30
  Downloaded thread_local v1.1.3
  Downloaded r0 v1.0.0
  Downloaded num-derive v0.2.5
  Downloaded panic-halt v0.2.0
  Downloaded quote v0.6.13
  Downloaded bare-metal v0.2.5
  Downloaded syn v0.15.44
  Downloaded riscv-rt-macros v0.1.6
  Downloaded st7735-lcd v0.7.2
  Downloaded gd32vf103xx-hal v0.4.0
  Downloaded embedded-graphics v0.6.2
  Downloaded gd32vf103-pac v0.4.0
  Downloaded 24 crates (1.2 MB) in 2.89s
   Compiling memchr v2.3.4
   Compiling semver-parser v0.7.0
   Compiling once_cell v1.5.2
   Compiling regex-syntax v0.6.22
   Compiling lazy_static v1.4.0
   Compiling proc-macro2 v0.4.30
   Compiling unicode-xid v0.1.0
   Compiling syn v0.15.44
   Compiling autocfg v1.0.1
   Compiling nb v1.0.0
   Compiling bit_field v0.10.1
   Compiling num-derive v0.2.5
   Compiling rand_core v0.4.2
   Compiling void v1.0.2
   Compiling vcell v0.1.3
   Compiling byteorder v1.4.2
   Compiling gd32vf103xx-hal v0.4.0
   Compiling longan-nano v0.2.0 (/devel/riscv/longan-nano)
   Compiling r0 v1.0.0
   Compiling panic-halt v0.2.0
error[E0463]: can't find crate for `core`
  |
  = note: the `riscv32imac-unknown-none-elf` target may not be installed

error[E0463]: can't find crate for `core`
  |
  = note: the `riscv32imac-unknown-none-elf` target may not be installed

error[E0463]: can't find crate for `core`
  |
  = note: the `riscv32imac-unknown-none-elf` target may not be installed

error[E0463]: can't find crate for `core`
  |
  = note: the `riscv32imac-unknown-none-elf` target may not be installed

error[E0463]: can't find crate for `core`
  |
  = note: the `riscv32imac-unknown-none-elf` target may not be installed

error[E0463]: can't find crate for `core`
  |
  = note: the `riscv32imac-unknown-none-elf` target may not be installed

error[E0463]: can't find crate for `core`
  |
  = note: the `riscv32imac-unknown-none-elf` target may not be installed

error: aborting due to previous error

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
For more information about this error, try `rustc --explain E0463`.
error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: could not compile `void`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

Googleing for the error, I came across this: https://github.com/rust-lang/rustup/issues/1905 But they suggest to install nightly, which contradicts the instructions from the README.

Disasm commented 3 years ago

Hi! As mentioned in README, you need to install the RISC-V target: rustup target add riscv32imac-unknown-none-elf. Note that you need to do this for each toolchain you want to use (like stable and nightly).

hansfbaier commented 3 years ago

@Disasm Thank you!