Skip to main content

Raspberry Pi Pico H

Specs

  • Dual core Arm Cortex M0+ 133 MHz
  • 264kB multi-bank high performance SRAM
  • 2MiB external flash
  • Datasheet: pico-datasheet.pdf

Pinout

  • VBUS 40 - micro-USB input voltage, connected to micro-USB port pin 1. This is nominally 5V (or 0V if the USB is not
    connected or not powered).
  • VSYS 39 - main system input voltage, which can vary in the allowed range 1.8V to 5.5V, and is used by the on-board
    SMPS to generate the 3.3V for the RP2040 and its GPIO.
  • GND 38 - ground.
  • UART TX 1 / RI 2
  • LED (GP25) - LED is connected to GPIO 25.

pico-pinout.pngRust

Dependencies

rustup target install thumbv6m-none-eabi
cargo install flip-link
cargo install --locked elf2uf2-rs

Set up mount point for RP2 device in /etc/fstab:

LABEL="RPI-RP2" /mnt/rp2 auto defaults,user,noauto,nosuid,nodev,noexec 0 0

Template project setup

Template project: https://github.com/rp-rs/rp2040-project-template

  1. Uncomment 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",

  2. Connect (while holding BOOTSEL button) and mount RP2 device: mount /mnt/rp2
  3. Build and run: cargo run --release

zeptoforth