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?

  • 5
    \$\begingroup\$ @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.) \$\endgroup\$ – stevenvh Oct 11 '12 at 20:33
  • 3
    \$\begingroup\$ I can do that. But I find your internet skills to be very poor if you honestly can't figure out what SWD is. \$\endgroup\$ – Trygve Laugstøl Oct 11 '12 at 20:47
  • 3
    \$\begingroup\$ @trygvis - I shouldn't have to look that up: that should be in the question. \$\endgroup\$ – stevenvh Oct 11 '12 at 21:04
  • 2
    \$\begingroup\$ 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. \$\endgroup\$ – stevenvh Oct 12 '12 at 5:44
  • 1
    \$\begingroup\$ @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? \$\endgroup\$ – 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.

  • \$\begingroup\$ 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. \$\endgroup\$ – 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.






SWD is Serial Wire Debug:


It's supported by the Rowley CrossWorks ARM tools that I use, and the Rowley CrossConnect JTAG adapter. Several other ARM toolsets and JTAG adapters support it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.