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. 第7月第26天 iOS httpserver

    1. cocoahttpserver 1)httpserver [httpServer start:&error] 2)HTTPConnection [newConnection start] ...

  2. Jmeter之逻辑控制器(Logic Controller)【转】

    Jmeter之逻辑控制器(Logic Controller) 前言: 1. Jmeter官网对逻辑控制器的解释是:“Logic Controllers determine the order in w ...

  3. Java实现继承过程概述

    super(); 在调用子类的构造器的时候,如果没有显示的写出 super(); ,那么,编译器会在佛那个加上 super(); 无参构造器 如果想调用父类的有参构造器,那么,必须显示的调用,编译器不 ...

  4. 浅谈js设计模式之发布 — 订阅模式

    发布 — 订阅模式又叫观察者模式,它定义对象间的一种一对多的依赖关系,当一个对象的状态发生改变时,所有依赖于它的对象都将得到通知.在 JavaScript开发中,我们一般用事件模型来替代传统的发布 — ...

  5. maven待整理

    http://blog.csdn.net/column/details/yuguiyang-maven.html?&page=2

  6. 把任意exe程序注册成windows系统服务

    某gae代理软件每次开机都需要手动启动,就算添加成开机启动项,在win8.1下权限的管理更加严格,开机时并不能成功启动软件(无人值守时开机),因此在网上搜索把exe注册成系统服务的办法,找到论坛两个帖 ...

  7. 【noip模拟赛2】牛跳

    描述 John的奶牛们计划要跳到月亮上去.它们请魔法师配制了P(1 <= P <=150,000)种药水,这些药水必需安原来的先后次序使用,但中间可以跳过一些药水不吃.每种药水有一个“强度 ...

  8. 【Java】 大话数据结构(6) 栈的顺序与链式存储

    本文根据<大话数据结构>一书,实现了Java版的栈的顺序存储结构.两栈共享空间.栈的链式存储机构. 栈:限定仅在表尾进行插入和删除操作的线性表. 栈的插入(进栈)和删除(出栈)操作如下图所 ...

  9. Vue之双向绑定原理动手记

    Vue.js的核心功能有两个:一是响应式的数据绑定系统,二是组件系统.本文是通过学习他人的文章,从而理解了双向绑定原理,从而在自己理解的基础上,自己动手实现数据的双向绑定. 目前几种主流的mvc(vm ...

  10. 解决:虚拟机能ping通主机,主机ping不通虚拟机

    问题:虚拟机能ping通主机,主机ping不通虚拟机 解决方法: 1. 使用桥接. 2. 关闭防火墙.