Profile：CMSIS-DAP compliant SWD Programmer for Microchip SAM and other ARM-based Microcontrollers
Open source license: CC-BY-SA 3.0
The SWD Programmer Stick is a CMSIS-DAP compliant debugging probe with SWD protocol support based on Free-DAP by Alex Taradov. It can be used to program Microchip SAM and other ARM-based microcontrollers. The SWD Programmer Stick is built around an ATSAMD11C14A microcontroller.
CMSIS-DAP provides a standardized way to access the Coresight Debug Access Port (DAP) of an ARM Cortex microcontroller via USB. CMSIS-DAP is generally implemented as an on-board interface chip, providing direct USB connection from a development board to a debugger running on a host computer on one side, and over JTAG (Joint Test Action Group) or SWD (Serial Wire Debug) to the target device to access the Coresight DAP on the other. For more information refer to the CMSIS-DAP Handbook.
You can either compile the firmware yourself, or you can use the precompiled binary. Since there is no dedicated header for programming on the board, the microcontroller should be programmed before soldering. The SAMD Programmer Adapter is helpful for this. In order to program the microcontroller after soldering, the solder pads on the underside of the board must be used.
Unfortunately, you need another programmer to program the programmer. Here are a few cheap ways to do it:
J-LINK EDU Mini is a version of the J-Link EDU in a reduced form factor with identical functionality as the larger devices. It has been designed to allow students and educational facilities as well as hobbyists access to top of the line debug probe technology. The device is available for around €16, the uploads are fast and it works reliably. It is not approved for commercial use.
These CMSIS-DAP compliant devices are available on aliexpress for around €10. They work fine too.
There are options to use the EDBG of some development boards for programming an external device, or to program them using a special firmware. Information on this can be found on the following pages:
Connect the SWD Programmer Stick to the target board via the 10-pin connector or the pin header (RST / DIO / CLK / GND). Make sure the target board is powered. You can supply power via the 3V3 pin (max 150 mA) or the 5V pin (max 400 mA). Plug the SWD Programmer Stick into a USB port on your PC. Since it is recognized as a Human Interface Device (HID), no driver installation is required. The SWD Programmer Stick should work with any debugging software that supports CMSIS-DAP (e.g. OpenOCD). Of course, it also works with the SAMD DevBoards in the Arduino IDE (Tools -> Programmer -> Generic CMSIS-DAP).