knurling-rs / probe-run

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

probe-run cannot detect pico #409

Closed colossalchicken closed 1 year ago

colossalchicken commented 1 year ago

Description probe-run is unable to detect my Raspberry Pi Pico. The pico is visible according to fdisk, so it is not a connection or permissions issue. Example

$ probe-run --list-probes

Error: no probe was found.

Common reasons for this are faulty cables or missing permissions.
For detailed instructions, visit: https://github.com/knurling-rs/probe-run#troubleshooting
$ sudo fdisk -l

...

Disk /dev/sda: 128 MiB, 134217728 bytes, 262144 sectors
Disk model: RP2
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000a6117
Urhengulas commented 1 year ago

It might be that you need to update the USB permissions. What is lsusb telling you? Refer to https://github.com/knurling-rs/probe-run/#error-no-probe-was-found for more steps.

jonathanpallant commented 1 year ago

Because you have shown fdisk output, I believe your RP2040 is in USB Bootloader mode. You cannot program an RP2040 in USB Bootloader mode with probe-run. Instead you must use a proper ARM SWD Debug Probe, like a SEGGER J-Link or a Raspberry Pi Debug Probe.

If you want to upload firmware to the RP2040 in USB Mass Storage mode, try elf2uf2, but then you won't get defmt logging.

Urhengulas commented 1 year ago

Thanks @jonathanpallant @colossalchicken Does this solve your question?

colossalchicken commented 1 year ago

Yes. Thanks!