pico-feedback icon indicating copy to clipboard operation
pico-feedback copied to clipboard

Content for the cmsis-dap Debug Probe in "Getting Started with Raspberry Pi Pico"

Open noutram opened this issue 1 year ago • 7 comments

Regarding: https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf

As the official Debug Probe is now available, it would be helpful to have this formally covered for C/C++ development - especially for use with an IDE such as Visual Studio Code.

The changes are small but significant (and quite hard to track down!)

Section 7.3

Having worked through this document for the first time, it was not clear that pico debug was different to the debug probe. I wasted considerable time trying to unpick the problem. I suspect I will not be the only person to make this incorrect assumption. I wonder if this is worth highlighting?

For the pico debug probe, the key to seamless debug in VS Code seems to be launch.json I've raised a PR to have a suitable template added to the examples. However, the change is quite easy (summarised below) and might be worth documenting?

Changes:

The file that becomes launch.json would need changing as follows:

  • Line 15 would need "interface/raspberrypi-swd.cfg" replaced with "interface/cmsis-dap.cfg"

  • To get the correct adapter speed, add the following:

    "serverArgs": [
      "-c", "adapter speed 5000"
    ],
    

This might save someone a lot of time.

noutram avatar Jun 29 '23 13:06 noutram