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. This provides a USB connection to the DAP that major tool vendors have started to support. It even provides the flexibility for users to write their own debugger, or debug script using the USB bindings in languages like Python.

What is CMSIS-DAP?

CMSIS-DAP provides a standardized way to access the Coresight Debug Access Port (DAP) of an ARM Cortex microcontroller via USB. CMSIS-DAP is generally implemented as an on-board interface chip, providing direct USB connection from a development board to a debugger running on a host computer on one side, and over JTAG (Joint Test Action Group) or SWD (Serial Wire Debug) to the target device to access the Coresight DAP on the other.

You can access the documentation on the ARM website. You will need to register for an ARM silver account to access the documentation.

Why the need for CMSIS-DAP ?

There are several reasons concerning the introduction of CMSIS-DAP:

  • Before the CMSIS-DAP standard, a lot of USB wigglers implemented their own protocols. With this configuration, the host debugger has to be aware of these different protocols and has to implement all of them, which produces a lot of fragmentation and re-inventing the wheel. At the same time, the protocols were usually defined at the JTAG level, meaning they are slow. CMSIS-DAP provides a standardised interface for debuggers that is defined at the Coresight DAP level, allowing for a standard interface and fast driverless implementations.
  • With the new CMSIS-DAP layer, the host debugger can debug targets over SWD or JTAG without the need to implement these two protocols
  • The USB connection uses the HID driver class. As HID drivers are built-in in every Operating Systems, there is no need for a specific driver to be installed on the host computer

How CMSIS-DAP can be integrated ?

As mentioned earlier, CMSIS-DAP has to be implemented on an Interface Chip. This chip provides the link between the host computer (over USB for instance) and the target that has to be debugged (over SWD or JTAG).

On the mbed hardware, the CMSIS-DAP firmware has been implemented on the mbed interface as part of the mbed HDK. In addition to the Mass Storage and the Virtual Serial port interfaces, a HID endpoint is used to establish a CMSIS-DAP communication link with a debugger.

Overview of the CMSIS-DAP standard

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.

Different types of commands can be issued by the host:

  • General Commands: request information and control the debug unit. Also used to connect/disconnect the debug unit.
  • Common SWD/JTAG commands: used for instance to set the clock speed
  • SWD specific commands: configure the parameters for SWD mode
  • JTAG specific commands: configure the JTAG device chain
  • Transfer Commands: read/write CoreSight registers. These commands are independent of the transport (SWD or JTAG)

Example: read memory over CMSIS-DAP

Let's say that a debugger needs to read the value at a specific location in memory. The following commands have to be sent by the host:

  • Transfer Command: write the CSW register (Control/Status Word Register). This will configure the transfer (32bits/16bits/8bits transfer)
  • Transfer Command: write the TAR register (Transfer Address Register) with the address of the memory location
  • Transfer Command: read the DRW register (Data Read/Write register) to read the value at the location specified earlier

Conclusion

CMSIS-DAP provides a standardized interface for debuggers. It will probably become the de-facto standard which debuggers and debug units will implement. This is why mbed chose to take advantage of this new standard to provide debug capabilities. For instance Keil uVision which combines an IDE, debugger and simulation environment already supports CMSIS-DAP. To try the new mbed interface with CMSIS-DAP, visit this page for more details :

What is CMSIS-DAP的更多相关文章

  1. cmsis dap interface firmware

    cmsis dap interface firmware The source code of the mbed HDK (tools + libraries) is available in thi ...

  2. STM32开发笔记之——CMSIS DAP

    都说开发stm32都是使用kail iar+jatg/swd的方式,然而arm公司已经开发出了CMSIS DAP的开源下载工具,全称是CoreSight Debug Access Port,网络上有大 ...

  3. STM32CubeIDE下载安装-GPIO基本配置操作-Debug调试(基于CMSIS DAP Debug)

    1.在ST官网下载STM32CubeIDE而不是STM32CubeMX,并且STM32CubeIDE是免费的.(STM32CubeIDE不支持中文路径,不然编译会出错) 2.如果你用的是keil开发环 ...

  4. SWD接口:探索&泄密&延伸

    http://bbs.21ic.com/icview-871133-1-1.html 文买了个JLINKV9,以为神器,拿到手发现根本不是,完全没必要替换V8,想自己做个另类的调试器,当然想只是想而已 ...

  5. Booting dircetly into Redlink FW from flash

    Booting dircetly into Redlink FW from flash Hello, the usual way to use the Redlink FW is a two-step ...

  6. CMSIS-DAP仿真器_学习(转载)

    先给大家普及一下,哈哈.CMSIS-DAP仿真器,是ARM官方做的开源仿真器,没有版权,自由制作.官方给的源代码,使用的是NXP的单片机LPC4320做的.这个源代码,只要你安装了KEIL5,就可以找 ...

  7. 沁恒CH32F103C8T6(三): PlatformIO DAPLink和WCHLink下载配置

    目录 沁恒CH32F103C8T6(一): Keil5环境配置,示例运行和烧录 沁恒CH32F103C8T6(二): Linux PlatformIO环境配置, 示例运行和烧录 沁恒CH32F103C ...

  8. DAP in Coresight

    DAP简单来说分成 DP + AP , Debug Port + Access Port Debug Port--和JTAG的接口叫做Debug Port Access Port--和内部其他的接口叫 ...

  9. (一)stm32之CMSIS标准、库目录、GPIO

    一.CMSIS标准 ST公司的stm32采用的是cortex-m3内核,内核是整个微处理器的CPU.该内核是ARM公司设计的一种处理器体系架构.内核与外设的关系就像PC上的CPU与硬盘.主板.内存等的 ...

  10. CMSIS标准

    CMSIS 标准(Cortex Microcontroller Software Interface Standard) ,翻译过来是"ARM Cortex™ 微控制器软件接口标准" ...

随机推荐

  1. HTML5+CSS把footer固定在底部

    在刚开始给网页写footer的时候,我们会碰到一个让人烦躁的问题:当页面内容太少时,footer显示在了页面中间,这是我们不希望出现的,我们希望它能够永远呆在底部,不管网页的内容是多还是少.下面的代码 ...

  2. CF359B Permutation (构造)

    CF359B Permutation \(solution:\) 作为一道构造题,这题也十分符合构造的一些通性----(找到一些规律,然后无脑循环). 构造一个长度为 \(2n\) 的排列 \(a\) ...

  3. 记webpack下引入vue的方法(非.vue文件方式)

    直接script引入下载静态的vue.js文件则最后用copy-webpack-plugin复制到一样的目录即可 使用npm安装的vue无法直接用 import vue from "vue& ...

  4. MySQL用户密码过期登陆报错ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

    今天接到主从复制失败告警,查看MySQL,发现MySQL能够登陆但是执行命令报错, ERROR 1820 (HY000): You must reset your password using ALT ...

  5. curl wget 不验证证书进行https请求【转】

    $ wget 'https://x.x.x.x/get_ips' --no-check-certificate $ curl 'https://x.x.x.x/get_ips' -k 转自 curl ...

  6. poj1142

    分解质因数 #include <iostream> #include <cmath> using namespace std; int sum(int n) { ; ) { a ...

  7. ZCTF-2017 比赛总结

    这次ZCTF办的还是相当不错的,至少对于Pwn来说是能够让人学习到一些东西. 第一天做的不是很顺利,一直卡在一道题上不动.第二天队友很给力,自己的思路也开阔起来了. 关于赛题的优点 我觉得这次的Pwn ...

  8. 【LOJ】#2531. 「CQOI2018」破解 D-H 协议

    题解 BSGS直接解出a和b来即可 代码 #include <bits/stdc++.h> #define fi first #define se second #define pii p ...

  9. echarts地图定时切换散点及多图表级联联动

    本文目录 1. 摘要 2.引入ECharts以及地图相关json 3. 界面布局 4. js实现图形布局 5.定时循环jquery实现 6. 总结 1.  摘要 最近做项目遇到个统计相关需求,一个页面 ...

  10. 013 jquery中关于表格行的增删问题

    1.程序 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <titl ...