簡單說, CMSIS-DAP 就是長出一個USB Flash disk , 可以用拖曳檔案到flash disk , 即是進行傳輸firmware到板子上的動作(upgrade firmware。 Windows 上出現隨身碟USB MSC界面,並不代表這是一個真實的file system, 可以用來儲存/更新檔案資料。DAP 就是Debug Access Port,只是以隨身碟的面貌存在於系統。
- The CMSIS-DAP Interface is a microcontroller based single chip solution that provides, Drag and Drop programming, CMSIS-DAP debugger and USB serial interface to a range of Cortex-M based microcontrollers.
- DAP over JTAG or SWD
- The mbed HDK and mbed-enabled hardware support the CMSIS-DAP debug interface, which consists of an abstraction of the Cortex Debug Access Port (DAP) command set over a driver-less USB HID connection.
- USB Serial interface between the host computer and the target
- Packets are exchanged between the host debugger and the Interface Chip. Basically, the host sends a command and the debug unit sends the response of the command.
- The firmware that supports CMSIS-DAP for your target and an offline tool that support CMSIS-DAP - Keil MDK v4.60 for example
Notes on JTAG and SWD
JTAG (Joint Test Action Group) : 5 pin
SWD ((Serial Wire Debug): 2 pin
Serial Wire Debug technology is available as part of the CoreSight™ Debug Access Port and provides a 2-pin debug port, the low pin count and high-performance alternative to JTAG.
SWD 可以完全用來取代JTAG, 原本JTAG 的5 pin中的TMS and TCK pins, 就是SWD的SWDIO and SWCLK,
When the Onboard Interface ( LPC11U35 or KL25Z,..) is plugged to an host PC it enumerates as a composite device with the following interfaces:
- MSD, mass storage device class
- CDC, communications device class
- HID, human interface device class
It is connected to the following pins of the target microcontroller:
- SWD + Reset
- UART
- Sleep and Wake (Not currently implemented, reserved for future use)
參考: