What is CMSIS-DAP
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的更多相关文章
- cmsis dap interface firmware
cmsis dap interface firmware The source code of the mbed HDK (tools + libraries) is available in thi ...
- STM32开发笔记之——CMSIS DAP
都说开发stm32都是使用kail iar+jatg/swd的方式,然而arm公司已经开发出了CMSIS DAP的开源下载工具,全称是CoreSight Debug Access Port,网络上有大 ...
- STM32CubeIDE下载安装-GPIO基本配置操作-Debug调试(基于CMSIS DAP Debug)
1.在ST官网下载STM32CubeIDE而不是STM32CubeMX,并且STM32CubeIDE是免费的.(STM32CubeIDE不支持中文路径,不然编译会出错) 2.如果你用的是keil开发环 ...
- SWD接口:探索&泄密&延伸
http://bbs.21ic.com/icview-871133-1-1.html 文买了个JLINKV9,以为神器,拿到手发现根本不是,完全没必要替换V8,想自己做个另类的调试器,当然想只是想而已 ...
- 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 ...
- CMSIS-DAP仿真器_学习(转载)
先给大家普及一下,哈哈.CMSIS-DAP仿真器,是ARM官方做的开源仿真器,没有版权,自由制作.官方给的源代码,使用的是NXP的单片机LPC4320做的.这个源代码,只要你安装了KEIL5,就可以找 ...
- 沁恒CH32F103C8T6(三): PlatformIO DAPLink和WCHLink下载配置
目录 沁恒CH32F103C8T6(一): Keil5环境配置,示例运行和烧录 沁恒CH32F103C8T6(二): Linux PlatformIO环境配置, 示例运行和烧录 沁恒CH32F103C ...
- DAP in Coresight
DAP简单来说分成 DP + AP , Debug Port + Access Port Debug Port--和JTAG的接口叫做Debug Port Access Port--和内部其他的接口叫 ...
- (一)stm32之CMSIS标准、库目录、GPIO
一.CMSIS标准 ST公司的stm32采用的是cortex-m3内核,内核是整个微处理器的CPU.该内核是ARM公司设计的一种处理器体系架构.内核与外设的关系就像PC上的CPU与硬盘.主板.内存等的 ...
- CMSIS标准
CMSIS 标准(Cortex Microcontroller Software Interface Standard) ,翻译过来是"ARM Cortex™ 微控制器软件接口标准" ...
随机推荐
- 转载 你不知道的super
http://funhacks.net/2016/11/09/super/ super仅被用于新式类 在类的继承中,如果重定义某个方法,该方法会覆盖父类的同名方法,但有时,我们希望能同时实现父类的功能 ...
- linux笔记_day11_shell编程
1.条件测试类型: 整数测试 字符测试 文件测试 条件测试的表达式: [ expression ] 必须有空格 [[ expression ]] test expression 整数比较 : -eq ...
- oracle 建用户
create user username identified by password; grant dba to username; 注意当对用户赋予resource角色时将同时赋予unlimite ...
- Casper带有4个内建记录级别
默认情况下,CasperJS会在‘error’级别过滤日志.所以如果你开始记录日志后没有看到任何东西,可能就是这个原因.为确保显示日志输出,我把它设置为‘debug’.而且我关闭了‘verbose’选 ...
- vs2017 Remote Debugger远程调试目录
默认目录:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Remote Debugger
- webRTC视频通话,https协议,录制端和播放端
最近做视频直播模块,在网上也看到很多大神写的代码,写的都不错,但不是我想要的,有的可能比较老,不支持https协议,有的又将直播端和显示端放在一个程序中,不利于我使用,则本篇着重添加了https协议( ...
- java 轨迹栈
printStackTrace()方法所提供的信息可以通过getStackTrace()方法直接访问. getStackTrace()方法返回一个由根轨迹中的元素所构成的数组,每一个元素都表示栈中的一 ...
- 通过微信Android和iOS版,看两大系统的差异
由于设计师或者产品经理使用的移动设备大部分是iPhone,所以在做设计时,容易忽略Android和iOS的差异,按照自己的使用习惯进行设计,导致大部分设计师或产品经理做出的设计都是基于iOS规范或习惯 ...
- Angular 5项目
Angular 5项目 如果您正在使用angular, 但是没有好好利用angular cli的话, 那么可以看看本文. Angular CLI 官网: https://github.com/angu ...
- streaming优化:并行接收数据
val numStreams = 5 val kafkaStreams = (1 to numStreams).map { i => KafkaUtils.createStream(...) } ...