knurling-rs / probe-run

Run embedded programs just like native ones
Apache License 2.0
646 stars 75 forks source link

Probes not found for RP Pico #370

Closed elpiel closed 1 year ago

elpiel commented 1 year ago

Describe the bug Although I followed the instructions for installation of probe-run and updated my udev permissions probe-run still can't find probes with list-probes or flash.

These are all udev rules I've tried and the latest one:

# ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0003", MODE:="0666"
# ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0003", MODE="666", GROUP="plugdev", TAG+="uaccess"
# ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0003", MODE="660", GROUP="plugdev", TAG+="uaccess"
# ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0003", MODE="777"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0003", MODE="0666"

After editing the file I always run:

sudo udevadm control --reload
udevadm trigger

My user also is in the plugdev user group:

$groups elpiel
elpiel : elpiel adm dialout cdrom sudo dip plugdev lpadmin sambashare docker firmwared wireshark

Using https://github.com/rp-rs/rp-hal examples work with runner = "elf2uf2-rs -d", however, when I switch to runner = "probe-run --chip RP2040" I get the probes not found error again.

To Reproduce

config.toml (from https://github.com/rp-rs/rp-hal)

#
# Cargo Configuration for the https://github.com/rp-rs/rp-hal.git repository.
#
# Copyright (c) The RP-RS Developers, 2021
#
# You might want to make a similar file in your own repository if you are
# writing programs for Raspberry Silicon microcontrollers.
#
# This file is MIT or Apache-2.0 as per the repository README.md file
#

[build]
# Set the default target to match the Cortex-M0+ in the RP2040
target = "thumbv6m-none-eabi"

# Target specific options
[target.thumbv6m-none-eabi]

rustflags = [
    "-C", "link-arg=--nmagic",
    "-C", "link-arg=-Tlink.x",
    "-C", "inline-threshold=5",
    "-C", "no-vectorize-loops",
]

# This runner will make a UF2 file and then copy it to a mounted RP2040 in USB
# Bootloader mode:
# runner = "elf2uf2-rs -d"

# This runner will find a supported SWD debug probe and flash your RP2040 over
# SWD:
runner = "probe-run --chip RP2040"

Probe details

$ probe-rs-cli list
No devices were found.

Operating System: Linux (Ubuntu 20.04)

elpiel commented 1 year ago

We need an external debugger for the PICO or another PICO to act as a debugger probe. This issue can be now closed,