A Nix flake template for developing Rust applications on the Raspberry Pi Pico microcontroller.
- Rust development environment with cross-compilation support
- Target:
thumbv6m-none-eabi(ARM Cortex-M0+) - Pre-configured with necessary tools and dependencies
- Nix flake for reproducible development environment
Create a new project using this template:
nix flake init -t github:Lugendre/rp-pico-templateOr specify the template explicitly:
nix flake new my-pico-project -t github:Lugendre/rp-pico-templateEnter the development shell:
nix developBuild the project:
cargo build --release- Hold the BOOTSEL button while connecting the Pico to your computer
- Copy the generated
.uf2file to the mounted Pico drive
- Nix with flakes enabled
- Raspberry Pi Pico hardware
src/main.rs- Main Rust source codeCargo.toml- Rust package configurationmemory.x- Memory layout for the Picoflake.nix- Nix flake configurationshell.nix- Development shell definition