# SWD debugging solution

I'm planning to start a project based around a Freescale Cortex-M0+ chip. Apparently the M0+ is SWD only and does not support JTAG.

I've been looking around, but I can't find much in the way of SWD programming hardware, and was wondering if anyone had a recommendation. I'd also like software that would allow me to step through my code on the chip. Any suggestions?

• @trygvis - since you created the SWD tag, you might as well fill out the tag's wiki excerpt. We still don't know what SWD means, and we can't decide whether a new tag for it is appropriate. (The tag system desperately needs maintenance as it is, without too many new tags which may only be used once.) – stevenvh Oct 11 '12 at 20:33
• I can do that. But I find your internet skills to be very poor if you honestly can't figure out what SWD is. – Trygve Laugstøl Oct 11 '12 at 20:47
• @trygvis - I shouldn't have to look that up: that should be in the question. – stevenvh Oct 11 '12 at 21:04
• And I think my searching skills are fine. It took me only 15 seconds to find that it means "Social Welfare Department". Which means that the question is off topic, BTW. – stevenvh Oct 12 '12 at 5:44
• @stevenvh - I'm still not impressed by your searching skills. Now that there is a SWD tag, should it still be a part of the question? If not, shouldn't the asker also define JTAG? and Cortex-M0? – Trygve Laugstøl Oct 12 '12 at 9:13

ST's extremely low cost cortex eval boards have a somewhat oddball USB-SWD adapter which can work with external targets as well as the on-board target by changing a few jumpers. There are open source PC-side drivers for these. What I don't know is if they are universal enough to work with other manufacturer's ARM chips as targets.

However, there's at least one Open-OCD compatible alternate firmware for the adapter on these boards floating around on the net, and one would think that either is universal, or can be modified to be, at least for targets where sufficient information has been publicly released.

• Personal experience now confirms that the ST-LINK stock firmware works for at least Nordic's BLE chips via OpenOCD; what is less clear is if it works with other things, because the ST-LINK scheme is a "high level adapter" which puts more functionality in the tool and less in the PC. In contrast, the CMSIS-DAP reference design is universal and could be adapted to run on an ST-LINK, but it makes less efficient use of the USB than the ST-LINK protocol and so is a bit slower with a full-speed MCU; most commercial tools implementing CMSIS-DAP use a high speed USB MCU which permits larger packets. – Chris Stratton Feb 23 '19 at 19:59

I use a Cortex-M0 part from NXP in my design. It also uses serial wire debug. On my custom board it was easy to lay this out as a 5x2 .05" header to make it compatible with LPCXpresso. My total cost was $27 for a LCPXpresso board with the separable JTAG and a$8 cable on Digikey. Then I used the free LPCXpresso IDE. The only problem is I don't know if the LPCXpresso JTAG is standard and will work with your Freescale part.

LPCXpresso:

http://www.digikey.com/product-detail/en/OM11049,598/568-4859-ND/2192565

Cable: