Raspberry pi pico can't debug

I use “wizio-pico” configuration.

Can upload firmware to pico, but click debug, nothing happens。

I had the same problem with dacoolinus。(https://github.com/Wiz-IO/wizio-pico/issues/119)

[env:raspberry-pi-pico]
platform = wizio-pico
board = raspberry-pi-pico
framework = baremetal

build_type = debug

upload_protocol = picoprobe
debug_tool = picoprobe

This is my “platformio.ini”

Can someone help me, thanks a lot

You follow the instructions DEBUG · Wiz-IO/wizio-pico Wiki · GitHub?

What text is appearing the “Debug Console” tab in VSCode?

I press and hold “BOOTSEL”, plug in the USB cable, and upload the firmware. But uploading the firmware again nothing happens. I can only unplug the USB cable again and repeat the previous operation.

image

This is my device manager.

I follow“ https://github.com/Wiz-IO/wizio-pico/wiki/DEBUG#picoprobe ”Operation,Nothing will change

You still didn’t answer my question on what output appears in the “Debug Console”.

Also, open a terminal and dp

git clone https://github.com/Wiz-IO/tool-pico-openocd
cd tool-pico-openocd
windows\picoprobe.exe -s share\openocd\scripts -f interface/picoprobe.cfg -f target/rp2040.cfg

What is the output?

Click the debug button, nothing

I can’t read chinese but I mean the “DEBUG CONSOLE” tab in VSCode. Even if it’s empty that’s good information

Yes, he is empty. Only compile information, click debug, nothing prints

Then please do as instructed here.

After I uploaded the firmware, my device manager could not find the PICO device.

C:\Users\17299>git clone GitHub - Wiz-IO/tool-pico-openocd: Raspberry Pi RP2040 OpenOCD
Cloning into ‘tool-pico-openocd’…
remote: Enumerating objects: 130, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 130 (delta 1), reused 3 (delta 0), pack-reused 120
Receiving objects: 100% (130/130), 14.72 MiB | 10.24 MiB/s, done.

Resolving deltas: 100% (40/40), done.

C:\Users\17299>cd tool-pico-openocd

C:\Users\17299\tool-pico-openocd>windows\picoprobe.exe -s share\openocd\scripts -f interface/picoprobe.cfg -f target/rp2040.cfg
Open On-Chip Debugger 0.10.0+dev-g14c0d0d-dirty (2021-01-27-15:43)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
Info : only one transport option; autoselect ‘swd’
adapter speed: 5000 kHz

Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : RP2040 Flash Bank Command
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: Failed to open or find the device
Error: Can’t find a picoprobe device! Please check device connections and permissions.

C:\Users\17299\tool-pico-openocd>windows\picoprobe.exe -s share\openocd\scripts -f interface/picoprobe.cfg -f target/rp2040.cfg
Open On-Chip Debugger 0.10.0+dev-g14c0d0d-dirty (2021-01-27-15:43)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
Info : only one transport option; autoselect ‘swd’
adapter speed: 5000 kHz

Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : RP2040 Flash Bank Command
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: Failed to open or find the device
Error: Can’t find a picoprobe device! Please check device connections and permissions.

C:\Users\17299\tool-pico-openocd>

So you did flash one Pico the picoprobe.uf2 firmware and changed the driver for “Picoprobe (Interface 2)” to WinUSB using Zadig? Because if yes, it should work.

grafik

C:\Users\Max\temp\tool-pico-openocd>windows\picoprobe.exe -s share\openocd\scripts -f interface/picoprobe.cfg -f target/rp2040.cfg
Open On-Chip Debugger 0.10.0+dev-g14c0d0d-dirty (2021-01-27-15:43)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'swd'
adapter speed: 5000 kHz

Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : RP2040 Flash Bank Command
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 5000 kHz
Info : SWD DPIDR 0x0bc12477
Info : SWD DLPIDR 0x00000001
Info : SWD DPIDR 0x0bc12477
Info : SWD DLPIDR 0x10000001
Info : rp2040.core0: hardware has 4 breakpoints, 2 watchpoints
Info : rp2040.core1: hardware has 4 breakpoints, 2 watchpoints
Info : starting gdb server for rp2040.core0 on 3333
Info : Listening on port 3333 for gdb connections
shutdown command invoked

No picoprobe device

Why is there a CMSIS-DAP debugger? You’re supposed to be uploading tool-pico-openocd/picoprobe.uf2 at main · Wiz-IO/tool-pico-openocd · GitHub to your the Pico that you want to be your Picoprobe, that one doesn’t expose a CMSIS-DAP debugger.

:joy:

Do you mean that I need to upload picoprobe.uf2 with CMSIS-DAP to appear picoprobe device

No.

  1. You have two Raspberry Pi Picos. One of them you designate to be the Picoprobe, the other one to run your firmware.
  2. You disconnect all cables between them (USB, jumper cables).
  3. You take the Pico that is supposed to become the Picoprobe, hold down the BOOTSEL button and plug it into your computer via USB.
  4. The bootdrive should appear.
  5. You drag and drop the picoprobe.uf2 file into the bootdrive.
  6. The Pico is now programmed to be the Picoprobe and should automatically reboot.
  7. You should now see “Picoprobe (Interface 2)” as a device in Zadig.
  8. Change the driver to WinUSB.
  9. Rerun the windows\picoprobe.exe -s share\openocd\scripts -f interface/picoprobe.cfg -f target/rp2040.cfg command with still only the Picoprobe plugged. It should now not say "Error: Can’t find a picoprobe device! " anymore, but should complain that it cannot find a chip connected to the Picoprobe. Is that correct?

:joy:

I always thought it would be done with one PICO.

OK, I see. Thanks for your answer, I started to try.Good night.

Picoprobe involves 2 Picos: One is the debugging probe, one is the board getting debugged.

https://arduino-pico.readthedocs.io/en/latest/platformio.html#debugging

Yes. I didn’t read these documents, and many problems occurred because of ignoring these documents. Thank you so much

Sorry to bother you again. My pico still can’t debug.

Processing raspberry-pi-pico (platform: wizio-pico; board: raspberry-pi-pico; framework: baremetal)
-------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
<<<<<<<<<<<< WIZIO - RASPBERRY PI PICO ( PICOPROBE ) 2021 Georgi Angelov >>>>>>>>>>>>
[PIO-ASM] File ( encoder.pio.h ) exist
CONFIGURATION: https://docs.platformio.org/page/boards/wizio-pico/raspberry-pi-pico.html
PLATFORM: WizIO - Raspberry Pi Pico (1.1.1+sha.6d2fe69) > WizIO - Raspberry Pi Pico ( PICOPROBE )
HARDWARE: RP2040 125MHz, 256KB RAM, 2MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, picoprobe)
PACKAGES:
 - framework-wizio-pico @ 1.1.1+sha.60881de
 - tool-wizio-pico @ 1.0.0+sha.3a504e1
 - toolchain-gccarmnoneeabi @ 1.70201.0 (7.2.1)

SDK RASPBERRYPI PI PICO RP2040 ( PICO - SDK )
  * OPTIMIZATION : -Os
  * STACK        : 2048
  * HEAP         : 2048
  * SPECS        : nano.specs
  * WIFI         : NO
  * BINARY TYPE  : default ['w25q080', 'memmap_default.ld', '0x10000000']

LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 8 compatible libraries
Scanning dependencies...
No dependencies
Building in debug mode
DONE
Checking size .pio\build\raspberry-pi-pico\APPLICATION.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]   7.7% (used 20196 bytes from 262144 bytes)
Flash: [=         ]   6.8% (used 142208 bytes from 2097152 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, picoprobe, uf2
CURRENT: upload_protocol = picoprobe
Uploading...
  Converting to UF2 ( 0x10000000 )
  Wrote 284672 bytes to C:/Users/17299/Documents/PlatformIO/Projects/raspberryPico_GRBL_MPG_DRO/.pio/build/raspberry-pi-pico\APPLICATION.uf2

   Pico USB drive not found.   

========================================================== [SUCCESS] Took 2.42 seconds ==========================================================