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:
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:
- Official
CMSIS-DAP
page: http://arm-software.github.io/CMSIS_5/DAP/html/index.html CMSIS-DAP
Details: http://arm-software.github.io/CMSIS_5/DAP/html/group__DAP__Commands__gr.html
(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:
- Official website: https://os.mbed.com/teams/mbed/wiki/SWDAP
- Official docs: https://os.mbed.com/platforms/SWDAP-LPC11U35/
- Official distributor page: https://l-tek.si/web-shop/l-tek-swdap-interface/
And the DAPLink
resources:
- Official website: https://os.mbed.com/handbook/DAPLink
- Official GitHub page: https://github.com/ARMmbed/DAPLink
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.
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.