CMSIS-DAP  Version 2.0.0
Interface Firmware for CoreSight Debug Access Port
 All Functions Groups Pages
Firmware for CoreSight Debug Access Port

CMSIS-DAP is a specification and a implementation of a Firmware that supports access to the CoreSight Debug Access Port (DAP).

The various Arm Cortex processors provide CoreSight Debug and Trace. CMSIS-DAP supports target Devices that contain one or more Cortex processors. A Device provides a Debug Access Port (DAP) typically either with a 5-pin JTAG or with a 2-pin Serial Wired Debug (SWD) interface that connects to a Debug Unit. CMSIS-DAP is the interface firmware for a Debug Unit that connects the Debug Port to USB. Debuggers that execute on a host computer connect via USB and the Debug Unit to the Device which runs the application software.

CMSIS_DAP_INTERFACE.png
CMSIS-DAP Overview

Configuration of CMSIS-DAP Firmware

The CMSIS-DAP Firmware version 2 can be configured in two different USB interface modes:

  • Version 1 configuration uses USB HID as interface to the host PC.
  • Version 2 configuration uses WinUSB as interface to the host PC and provides high-speed SWO trace streaming.

Benefits of CMSIS-DAP

  • Provides a standardized interface for debuggers. Interfaces to many standard debuggers is available.
  • Access to CoreSight registers of all Cortex processor architectures (Cortex-A/R/M).
  • Connects via 5-pin JTAG or 2-pin Serial Wire Debug (SWD).
  • Supports multi-core debugging.
  • Supports Serial Wire Output of Cortex-M devices (new in CMSIS-DAP Version 1.1.0).
  • Easy to deploy to Debug Units based on Cortex-M microcontrollers.
  • Debug Unit may be integrated on an evaluation board.
  • USB using HID (Human Interface Device) driver class that avoids driver installation on host PC.
  • Supports time-critical JTAG or SWD command execution (new in CMSIS-DAP Version 1.10).
  • Supports Test Domain Timer for time measurement using the debug unit (new in CMSIS-DAP Version 1.2.0)

CMSIS-DAP Firmware

The CMSIS-DAP Firmware is provided as source code and is fully configurable to a new Debug Unit. A source code template and several reference implementations for popular Debug Units are provided. Refer to Firmware Configuration for more information.

The CMSIS-DAP Software Stack is composed of the following components:

  • CMSIS-DAP Firmware that interfaces to JTAG or SWD Debug pins using standard I/O pins of the Cortex-M device.
  • CMSIS-Driver USART that connects the UART of the Cortex-M device to the SWO output from the target.
  • USB Communication Stack that interfaces to the USB Port of the Host Computer using the HID or custom class.
  • The USB Device middleware may require CMSIS-RTOS and a CMSIS-Driver USB.
CMSIS_DAP_SWStack.png
CMSIS-DAP Software Stack

In the examples provided the MDK Version 5 USB Communication Stack has been used. However it is possible to use alternative USB stacks instead.

The CMSIS-DAP Firmware is provided in the following directory structure.

Directory Description
.\CMSIS\DAP\Firmware\Config CMSIS-DAP Firmware configuration
.\CMSIS\DAP\Firmware\Examples CMSIS-DAP Firmware adapted to various Debug Units
.\CMSIS\DAP\Firmware\Include CMSIS-DAP Firmware header file
.\CMSIS\DAP\Firmware\Source CMSIS-DAP Firmware source code
.\CMSIS\DAP\Firmware\Template Interface Templates for MDK Version 5 middleware

Debug Access

Note
Arm plans to provide the RDDI-DAP Access DLL that connects a debugger to the CMSIS-DAP Firmware. However as the DAP registers are standard in all Cortex devices, the debug access is well understood by the industry.

Validation

CMSIS-DAP compliant Debug Units must be validated using the scripts provided in Validate Debug Unit.