More clear instrucions, add RISC-V target instructions
This commit is contained in:
parent
5c965ad687
commit
af1d068778
20
readme.md
20
readme.md
|
@ -1,14 +1,14 @@
|
|||
# Raspberry Pi Pico 2 - with Rust!
|
||||
|
||||
You will need nix with flakes enabled. Then:
|
||||
# Setup
|
||||
|
||||
```shell_session
|
||||
$ direnv allow # setup rustup and picotool
|
||||
$ 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
|
||||
```
|
||||
1. Get `rustup` and `picotool` by running `direnv allow` (or however you like)
|
||||
2. Install Rust components via `rustup` by running `rustup show`
|
||||
|
||||
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]
|
||||
channel = "1.80"
|
||||
components = ["rustc", "cargo"]
|
||||
targets = ["thumbv8m.main-none-eabihf"]
|
||||
targets = ["thumbv8m.main-none-eabihf", "riscv32imac-unknown-none-elf"]
|
||||
profile = "minimal"
|
||||
|
|
Loading…
Reference in a new issue