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. MAC Book 共享网络连接

    CHENYILONG Blog MAC Book 共享网络连接 MAC Book 共享网络连接 MAC比Windows共享连接要方便很多,只需要以下两步操作: 1.打开系统偏好设置,选择共享 2.选择 ...

  2. 查看IP以及连接数

    AWK: time awk 'BEGIN{while("netstat -an"|getline){if( $5 ~ /[1-255]/){split($5,t1,":& ...

  3. linux下的usb转串口的使用(修改)【转】

    环境:Ubuntu 10.10 Server minicom是linux下串口通信的软件,它的使用完全依靠键盘的操作,虽然没有“超级终端”那么易用,但是使用习惯之后读者将会体会到它的高效与便利,下面将 ...

  4. springcloud使用使用Feign-Ribbon做负载均衡实现声明式REST调用

    什么是Feign Feign是一个声明式的伪Http客户端,它使得写Http客户端变得更简单.使用Feign,只需要创建一个接口并注解.它具有可插拔的注解特性,可使用Feign 注解和JAX-RS注解 ...

  5. node.js模块、包

    创建模块 Node.js 提供了 exports 和 require 两个对象,其中 exports 是模块公开的接口,require 用于从外部获取一个模块的接口,即所获取模块的 exports 对 ...

  6. SSH免密登录机制

     SSH免密登录机制:(见下图) 1.A先使用ssh-keygen生成一对公钥和私钥:ssh-keygen 2.将A的公钥复制给B一份,并且将其追加到B的授权文件中:ssh-copy-id B 3.接 ...

  7. 自然语言处理---用隐马尔科夫模型(HMM)实现词性标注---1998年1月份人民日报语料---learn---test---evaluation---Demo---java实现

    先放上一张Demo的测试图 测试的句子及每个分词的词性标注为:   目前/t 这/rzv 条/q 高速公路/n 之间/f 的/ude1 路段/n 已/d 紧急/a 封闭/v ./w 需要基础知识 HM ...

  8. Windows 下 MySql 5.7.20安装及data和my.ini文件的配置(转)

    Windows 下 MySql 5.7.20安装及data和my.ini文件的配置     本文通过图文并茂的形式给大家介绍了MySql 5.7.20安装及data和my.ini文件的配置方法. my ...

  9. jquery获取浏览器各种高宽

    $(document).ready(function(){ alert($(window).height()); //浏览器当前窗口可视区域高度 alert($(document).height()) ...

  10. mini-css-extract-plugin简介

    将css单独打包成一个文件的插件,它为每个包含css的js文件都创建一个css文件.它支持css和sourceMaps的按需加载. 目前只有在webpack V4版本才支持使用该插件 和extract ...