Closed dimitre closed 5 years ago
that's strange ! you're right that note: the
riscv64imac-unknown-none-elftarget may not be installed
is usually the consequence of not having done rustup target add riscv64gc-unknown-none-elf
—the only thing I can think of is that you might have multiple toolchains installed rustup toolchain list
and don't have the target for the specific toolchain you're using to build, it doesn't automatically install every target for every installed toolchain
strange indeed. maybe something wrong here with my rust installation
rustup target add riscv64gc-unknown-none-elf
info: component 'rust-std' for target 'riscv64gc-unknown-none-elf' is up to date
autechre:~ z$ rustup toolchain list
stable-x86_64-apple-darwin (default)
autechre:~ z$
user@riscv:~/maixgo/k210-sdk-stuff/rust/game-of-life$ rustup target list|grep -e '\(installed\|default\)'
riscv64gc-unknown-none-elf (installed)
x86_64-unknown-linux-gnu (default)
user@riscv:~/maixgo/k210-sdk-stuff/rust/game-of-life$ rustup toolchain list
stable-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu (default)
user@riscv:~/maixgo/k210-sdk-stuff/rust/game-of-life$ cargo build --release
Compiling semver-parser v0.7.0
Compiling proc-macro2 v0.4.30
Compiling unicode-xid v0.1.0
Compiling syn v0.15.39
Compiling rand_core v0.4.0
Compiling riscv v0.5.3
Compiling bit_field v0.9.0
Compiling riscv-rt v0.6.0 (https://github.com/rust-embedded/riscv-rt.git?rev=e9bb7e0964aea781f1121cee82dd55098a4b43e8#e9bb7e09)
Compiling r0 v0.2.2
Compiling k210-pac v0.1.0 (/home/user/maixgo/k210-crates/k210-pac)
Compiling libm v0.1.4
Compiling void v1.0.2
Compiling vcell v0.1.0
Compiling nb v0.1.2
Compiling k210-shared v0.1.0 (/home/user/maixgo/k210-sdk-stuff/rust/k210-shared)
Compiling rand_core v0.3.1
Compiling rand v0.5.6
Compiling embedded-hal v0.2.3
Compiling semver v0.9.0
Compiling rustc_version v0.2.3
Compiling bare-metal v0.2.4
Compiling quote v0.6.12
Compiling riscv-rt-macros v0.1.6 (https://github.com/rust-embedded/riscv-rt.git?rev=e9bb7e0964aea781f1121cee82dd55098a4b43e8#e9bb7e09)
Compiling k210-hal v0.1.0 (https://github.com/riscv-rust/k210-hal.git?rev=b83e843c19a2f0bc4eb7f56322ae844818709298#b83e843c)
Compiling game-of-life v0.1.0 (/home/user/maixgo/k210-sdk-stuff/rust/game-of-life)
Finished release [optimized] target(s) in 53.39s
user@riscv:~/maixgo/k210-sdk-stuff/rust/game-of-life$ size ../target/riscv64gc-unknown-none-elf/release/game-of-life
text data bss dec hex filename
40194 0 6251240 6291434 5fffea ../target/riscv64gc-unknown-none-elf/release/game-of-life
note that I only test with nightly, so don't know for sure if stable works
Thank you very much. Installing nightly here worked as a charm. will grab my Maix Bit now :)
I'm trying to run examples on Macos and it is giving me the following errors: already installed target using rustup target add riscv64gc-unknown-none-elf any ideas? thank you