pyocd / pyOCD

Open source Python library for programming and debugging Arm Cortex-M microcontrollers
https://pyocd.io
Apache License 2.0
1.13k stars 484 forks source link

Unable to debug the Raspberry Pi Pico with Pitaya Link probe #1227

Closed lerouxb closed 3 years ago

lerouxb commented 3 years ago

I have a Pitaya Link (https://www.tindie.com/products/zelin/pitaya-link-cmsis-dap-debug-probe/) running the DAPLink firmware (https://github.com/ARMmbed/DAPLink) and when trying to start gdb server (pyocd gdbserver --target RP2040) I get the error pyocd.core.exceptions.TargetSupportError: RP2040 requires a debug probe with SWD sequence capability.

From what I understand DAPLink should work, though?

pyocd list
  #   Probe                   Unique ID
--------------------------------------------------------------------------------
  0   ARM DAPLink CMSIS-DAP   10283602077b088900000000000000000000000097969902
flit commented 3 years ago

This means that the Pitaya Link is using an old version of the CMSIS-DAP protocol, and therefore probably an old version of DAPLink.

The RP2040 has an unusual debug interface configuration that requires some extra commands in CMSIS-DAP that were only added in version 1.2.0 of the protocol.

You should be able to upgrade your Pitaya Link firmware to resolve this. Download the DAPLink 0254 release and look for the lpc11u35_if_crc.bin firmware binary. (Unfortunately we don't have the firmware for standalone debug probes on the https://daplink.io/ site yet.)

You could also try out the 0256 alpha9 release.