Update flake.nix and README.md for Raspberry Pi Pico W support

This commit is contained in:
2026-06-04 13:44:22 -05:00
parent b5977d64ed
commit 8543d79960
2 changed files with 8 additions and 25 deletions
+2 -11
View File
@@ -73,16 +73,11 @@
rustup
# Embedded Rust tooling
probe-rs-tools
espflash
openocd
minicom
# RP2040 UF2 workflows
elf2uf2-rs
picotool
avrdude
pkgsCross.avr.buildPackages.libc
pkgsCross.avr.buildPackages.gcc
ravedude
pre-commit
];
@@ -102,15 +97,11 @@
export PATH="$HOME/.cargo/bin:$PATH"
if command -v rustup >/dev/null 2>&1; then
echo "Ensuring common embedded Rust targets are available (idempotent)..."
echo "Ensuring Raspberry Pi Pico W target is available (idempotent)..."
rustup target add thumbv6m-none-eabi >/dev/null 2>&1 || true # Cortex-M0/M0+ (RP2040)
rustup target add thumbv7em-none-eabihf >/dev/null 2>&1 || true # Cortex-M4F/M7F (many STM32/nRF52)
rustup target add riscv32imc-unknown-none-elf >/dev/null 2>&1 || true
rustup target add riscv32imac-unknown-none-elf >/dev/null 2>&1 || true # ESP32-C3 class
echo "Note: ESP32 Xtensa targets require espup/custom toolchains (see esp-rs)."
fi
echo "[rust-template] Welcome to the Rust dev shell!"
echo "Tools: cargo, rustc, clippy, rustfmt, rust-analyzer, probe-rs, espflash, openocd, minicom, elf2uf2-rs, picotool, avrdude, ravedude"
echo "Tools: cargo, rustc, clippy, rustfmt, rust-analyzer, probe-rs, openocd, minicom, elf2uf2-rs, picotool"
echo "Run 'cargo build' to build, or 'nix run .#dev-helper' for a tool summary."
echo "See README.md for usage."
'';