5
\$\begingroup\$

EDIT :
I got the basic questions (for example, what is CMSIS-DAP?) answered by user @Nipo. Based on that, I restructured my post in a more logical way. Hopefully the remaining questions will be answered as well :-)

 

1. Programming a microcontroller

To program and/or debug a microcontroller, the following procedure is common:

enter image description here

There are tons of different probes on the market. The communication between the probe and the microcontroller is standardized in the SWD and JTAG protocols. The communication between the probe and the host computer is unfortunately not standardized. That makes the job of OpenOCD very hard. This software - running on the host computer - attempts to connect to the probe. Just imagine how much work the OpenOCD folks have to support all of them!
ARM makes an effort to standardize this USB-communication between the probe and the host computer.

 

2. The CMSIS-DAP standard

CMSIS-DAP is the specification (or standard, or protocol, or ...) from ARM, defining how a programmer/debug probe should be built. From my understanding, it specifies some hardware aspects as well as the communication protocol between the host computer and the probe(1).

QUESTION 1:
Where is the official CMSIS-DAP specification to be found? I know the GitHub of CMSIS-DAP is getting replaced by a new GitHub from DAPLink. But let's not forget: DAPLink is merely an implementation of the standard. I don't know where to find the standard itself...

ANSWER:
User @Nipo posted the links:

 
(1) I believe the communication between the probe and the host computer is defined by this CMSIS-DAP protocol, but not the communication between the probe and the microcontroller, because that's already defined by either the JTAG or SWD protocol.

 

3. The SWDAP probe and DAPLink

The SWDAP probe is a hardware implementation and DAPLink a firmware implementation of the CMSIS-DAP specification. Obviously, the DAPLink firmware runs on the SWDAP hardware.

I list the SWDAP resources for you:

enter image description here

And the DAPLink resources:

 
QUESTION 2:
The SWDAP probe runs the DAPLink firmware, so it should support both SWD and JTAG. But Mr. Gorazd Kovacic from LTek answered me in a mail that the SWDAP probe supports only SWD. I believe he is wrong. What do you think?
Note: I can only test it next week when the right hardware arrives.

ANSWER:
User @Nipo states: "All probes using DAPLink implementation as core firmware will provide the same set of functionalities." So the only limitation is on the hardware. If the hardware manufacturer did not provide the proper JTAG connections, you're out of luck.

 

4. Using OpenOCD for the SWDAP probe

I know that the SWDAP probe is built for use with pyOCD. That brings us to my third question:

 
QUESTION 3:
Can the SWDAP probe (and the CMSIS-DAP probe) be used with OpenOCD also? Or only with pyOCD?  
 
ANSWER:
I got a mail from the OpenOCD developers mailing list to answer this question. Mr. Paul Fertser mentioned the cmsis-dap.cfg config file, to be found in the openocd/scripts/interface/ folder. I will test it next week, when my hardware arrives.

 

5. The mysterious CMSIS-DAP probe

The CMSIS-DAP probe from LTek (https://l-tek.si/web-shop/cmsis-dap-debug-probe) is still somewhat a mystery to me. As CMSIS-DAP is just a standard (or call it 'specification' or 'protocol'), the probe's name is a bit confusing. Therefore it should be named CMSIS-DAP-compliant probe instead.

enter image description here

This brings us to the last question:

 
QUESTION 4:
I still don't get how this probe differs from the SWDAP probe. They are both from the same supplier LTek, and seem to be designed both by ARM.

ANSWER:
Apparently, this probe is just some kind of clone of the SWDAP probe, therefore complying to the CMSIS-DAP standard. The name of this probe is just a bit misleading.

\$\endgroup\$
  • \$\begingroup\$ Worth noting that some of the published CMSIS-DAP implementations (especially the more portable ones) are very slow compared to other solutions. Beyond the CMSIS-DAP idea specifically, most simple debug adapters do not support having the target's operating voltage more than a diode drop away from the adapter's. Ideally in buying a "better" adapter you are paying for a faster communication solution, and voltage flexibility; but with some products that shall remain nameless, much of what you are paying for is the name of a company, and sometimes intentionally added hassles. \$\endgroup\$ – Chris Stratton Nov 6 '18 at 16:25
4
\$\begingroup\$

CMSIS is the generic name for ARM-specified infrastructure around Cortex processors. The project we know today as DAPLink actually started as mbedmicro/CMSIS-DAP, we can find multiple references of the rename in the project history. "CMSIS-DAP" name became ambiguous as it was both the name for the spec and Mbed's implementation.

So today, CMSIS-DAP is the protocol, DAPLink is an implementation of this protocol.

CMSIS-DAP is not the most efficient debugger protocol in the JTAG/SWD world, but gets the job done at a (very) reasonable probe-side computing resources (i.e. entry-level MCUs with USB can run it, like cheap LPC11s). CMSIS-DAP is supported by OpenOCD and many other tools on the host side.

CMSIS-DAP specifies both JTAG and SWD commands, DAPLink provides support for both.

As DAPLink is an implementation with a permissive license, it can basically be used anywhere at no extra cost. Many different vendors create boards with DAPLink firmware on them, either alone (making a standalone probe like you linked) or alongside a target CPU (like we have on devboards). All hardware implementations of DAPLink embed the same firmware with the same functionalities, and you should be able to rebuild DAPLink and update them if needed.

Update after modifications from OP

CMSIS-DAP is defined in relevant document on ARM software page. You'll find all the details in Reference section.

LTek may name its boards as they want, even if name is somewhat misleading.

As I wrote above, all probes using DAPLink implementation as core firmware will provide the same set of functionalities.

As for the SWD/JTAG support, the only limitation you may have on some boards will be hardware: if manufacturers did not provide connections for TDI and TDO, you are out of luck to make JTAG work with them.

About SWDAP probe, ARM's own page states "The SWDAP is an open hardware design delivered as part of the mbed-HDK", that's why LTek is able to provide a verbatim clone.

\$\endgroup\$
  • 1
    \$\begingroup\$ Hi @Nipo, thank you very much. Your answer helped significantly to gain insight in the terminology used by ARM. However, there are still a few things unclear. I've restructured my original post, and listed the unclear stuff in 4 questions. Please have a look at them. I'd be very grateful :-) \$\endgroup\$ – K.Mulier Nov 6 '18 at 11:13
2
\$\begingroup\$

DAPLink states that it uses the CMSIS-DAP protocol, which is supported by OpenOCD

CMSIS-DAP, as the name suggests, is a protocol and firmware developed by ARM - the company which designes the processor cores. The firmware itself supports both SWD and JTAG. http://www.keil.com/pack/doc/cmsis/DAP/html/index.html?_ga=2.84588765.557139549.1541455299-619225292.1541455299

Judging by the PCB labeling ("ARM University") the CMSIS-DAP probe is a reference implementation from ARM or their affiliate.

\$\endgroup\$

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.