More clear instrucions, add RISC-V target instructions
This commit is contained in:
parent
5c965ad687
commit
af1d068778
2 changed files with 11 additions and 11 deletions
20
readme.md
20
readme.md
|
@ -1,14 +1,14 @@
|
||||||
# Raspberry Pi Pico 2 - with Rust!
|
# Raspberry Pi Pico 2 - with Rust!
|
||||||
|
|
||||||
You will need nix with flakes enabled. Then:
|
# Setup
|
||||||
|
|
||||||
```shell_session
|
1. Get `rustup` and `picotool` by running `direnv allow` (or however you like)
|
||||||
$ direnv allow # setup rustup and picotool
|
2. Install Rust components via `rustup` by running `rustup show`
|
||||||
$ rustup show # install rustc, cargo, and the pico 2 toolchain
|
|
||||||
# plug in your pico 2 while holding the BOOTSEL button
|
|
||||||
$ cargo run --release
|
|
||||||
# this will probably fail the first and you will need to install whatever is missing with rustup
|
|
||||||
# then try again
|
|
||||||
```
|
|
||||||
|
|
||||||
Have fun!
|
# Flashing
|
||||||
|
|
||||||
|
Hold your Pi Pico 2's `BOOTSEL` button while plugging it in to your machine.
|
||||||
|
Then run `cargo run --release`.
|
||||||
|
|
||||||
|
To use the RISC-V target, run
|
||||||
|
`cargo run --release --target riscv32imac-unknown-none-elf`.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "1.80"
|
channel = "1.80"
|
||||||
components = ["rustc", "cargo"]
|
components = ["rustc", "cargo"]
|
||||||
targets = ["thumbv8m.main-none-eabihf"]
|
targets = ["thumbv8m.main-none-eabihf", "riscv32imac-unknown-none-elf"]
|
||||||
profile = "minimal"
|
profile = "minimal"
|
||||||
|
|
Loading…
Reference in a new issue