From af1d068778c08e7a2d829a1adc6fa0af9c9a6476 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 9 Oct 2024 16:17:22 -0500 Subject: [PATCH] More clear instrucions, add RISC-V target instructions --- readme.md | 20 ++++++++++---------- rust-toolchain.toml | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/readme.md b/readme.md index 046148a..a783d9c 100644 --- a/readme.md +++ b/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`. diff --git a/rust-toolchain.toml b/rust-toolchain.toml index f036ad1..c6c5634 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -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"