Raspberry Pi RP2
Rust
Setup:
Dependencies
rustup target install thumbv6m-none-eabi
cargo install flip-link
# Installs the probe-rs tools, including probe-rs run, our recommended default runner
cargo install --locked probe-rs-tools
# If you want to use elf2uf2-rs instead, do...
cargo install --locked elf2uf2-rs
Template project setup
Template project: https://github.com/rp-rs/rp2040-project-template
elf2uf2-rs -d runner in .cargo/config.toml:
diff --git a/.cargo/config.toml b/.cargo/config.toml
index a565984..04a72c4 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -2,8 +2,8 @@
# Choose a default "cargo run" tool (see README for more info)
# - `probe-rs` provides flashing and defmt via a hardware debugger, and stack unwind on panic
# - elf2uf2-rs loads firmware over USB when the rp2040 is in boot mode
-runner = "probe-rs run --chip RP2040 --protocol swd"
-# runner = "elf2uf2-rs -d"
+#runner = "probe-rs run --chip RP2040 --protocol swd"
+runner = "elf2uf2-rs -d"
rustflags = [
"-C", "linker=flip-link",
Connect and mount RP2 device:
mount /mnt/usb
Build and run: cargo run --release