Skip to content

simple DAP SWD probe implementation for RP2040 microcontrollers

Notifications You must be signed in to change notification settings

ccattuto/rp2040-dap-probe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RP2040-DAP-probe

This is a simple but fully-featured implementation of a DAP probe based on the RP2040 microntroller found, e.g., in the Raspberry Pico board. It is based on TinyUSB's hid-composite example and inspired by pico-debug.

It shows up as a USB full-speed devices supporting DAP over HID and WebUSB. Because of RP2040's 125 MHz clock speed and fast GPIO peripheral, this provides a fast and cheap DAP probe suitable for many applications.

The code was tested on a Raspberry Pico and a 01Space RP2040-0.42LCD board, using both pyOCD (HID device) and the DAP.js examples (WebUSB device).

Configuration

  • The GPIO pins used for the SWD signals (SWDIO, SWDCLK and nRESET) are configured here.
  • the USB vendor and device ID can be configured here.
  • The probe's vendor and name strings can be configured here.

Building and flashing

The project depends on CMSIS 5, which is assumed to be symlinked from the projects' main directory. Of course, a submodule will work too. Create a build subdirectory, and from there fun cmake .. followed by make. The resulting dap.uf2 can be dragged & dropped to RP2040's bootloader volume. Notice: recent version of OSX break drag & drop programming, in that case use cp -X dap.uf2 .... After flashing, a composite HID and WebUSB full-speed device will appear.

License

This code is published under the MIT license.

About

simple DAP SWD probe implementation for RP2040 microcontrollers

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published