Skip to main content

Rasberry Pi Debug Probe

  • CMSIS-DAP
  • UART (U) and I2C connector (D)
  • Does not provide power, target board needs to be powered but mind it needs shared ground

Pinout

  • Orange - TX/SC (Output from Probe)
  • Black - GND
  • Yellow - RX/SD (Input to Probe or I/O)

Pico connection

  • The Debug Probe "D" port to Pico H SWD JST-SH connector

  • The Debug Probe "U" port, with the three-pin JST-SH connector to 0.1-inch header (male):

    • Debug Probe RX connected to Pico H TX pin

    • Debug Probe TX connected to Pico H RX pin

    • Debug Probe GND connected to Pico H GND pin

Debugging

 openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "adapter speed 5000"
 # on another terminal
 telnet localhost 4444
 reg

Flashing and debugging

probe-rs

    Project template for rp2040-hal

    Using runner command: sudo probe-rs run --chip RP2040 --protocol swd

    Cargo configuration:

    .cargo/config.toml
    [target.'cfg(all(target_arch = "arm", target_os = "none"))']
    # 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 = "sudo probe-rs run --chip RP2040 --protocol swd"
    # runner = "elf2uf2-rs -d"
    
    rustflags = [
      "-C", "linker=flip-link",
      "-C", "link-arg=--nmagic",
      "-C", "link-arg=-Tlink.x",
      "-C", "link-arg=-Tdefmt.x",
    
      # Code-size optimizations.
      #   trap unreachable can save a lot of space, but requires nightly compiler.
      #   uncomment the next line if you wish to enable it
      # "-Z", "trap-unreachable=no",
      "-C", "no-vectorize-loops",
    ]
    
    [build]
    target = "thumbv6m-none-eabi"
    
    [env]
    DEFMT_LOG = "debug"