ARM Debugging using XStream and XStreamPro Adapters (CMSIS-DAP 2.0)

This page references the CMSIS-DAP 2.0 Debugger (XS) product directly, and also any FlashPro-ARM and GangPro-ARM enabled XStream (XStream-Iso and XStreamPro-Iso) black adapters.

The XStream adapters support the CMSIS-DAP 2.0 debugging protocol. The debugging software is designed for IDEs that target ARM MCUs and support the CMSIS-DAP 2.0 protocol from ARM.

The functionality of this debugging tool has been verified on:

  • IAR EWARM, and

  • Keil uVision

NOTE: Any CMSIS-DAP 2.0 compatible IDE can use this debugger.

The debugging software package comes with a Windows USB driver that can register XStream adapters as CMSIS-DAP debuggers or standard Elprotronic Flash/Gang Programmers. The software is available for download online at http://www.elprotronic.com (supported from Windows 7 to Windows 10) or directly here:

The debugging software enables communication with the IDE at USB full-speed performance with communication up to 12 Mb/s (1.5 MB/s). On the adapter side, the XStream adapter can communicate with the target device via JTAG or SWD protocol with programmable speed ranging from 100kHz to 20 MHz. In addition, when the SWD protocol is selected, the SWO line can be used for tracing the data transferred from debugged target (if supported) via UART protocol with programmable baud rate between 10 kb/s to 12.5 Mb/s.

1. Key Features

XStream-Iso and XStreamPro-Iso adapters can be configured as CMSIS-DAP debuggers supporting the CMSIS-DAP 2.0 protocol for ARM MCUs. Any IDE that supports the CMSIS-DAP 2.0 protocol can then use the XStream adapter in this mode for debugging.

The key features of the CMSIS-DAP setup for XStream adapters:

  • Supports the CMSIS-DAP 2.0 communication protocol via USB interface.

  • Debugging via JTAG or SWD interface.

  • Programmable JTAG/SWD communication speed from 100 kHz to 20 MHz.

  • Supports tracing via SWO pin when SWD interface is used.

  • Trace via UART with programmable baud rate from 10 kb/s up to 12.5 Mb/s

  • Trace buffer size – 32 kB

  • Target device can be powered from external power supply or from XStream adapter.

  • Programmable power supply from adapter – 1.65V to 4.0V for XStream-Iso adapter and in the range 1.2V to 4.0 V for XStreamPro-Iso adapter. Max current up to 200 mA.

  • Easy to use WindowsTM based software for configuration setup.

  • XStream-Iso and XstreamPro-Iso adapters that already have the FlashPro-ARM, GangPro-ARM, FlashPro-X and GangPro-X license, can also run the XS-CMSIS-DAP software after they download the latest ARM software package update.

NOTE: The CMSIS-DAP 2.0 Debugger (XS) product itself is a dedicated low-cost debugging adapter that does not run any other Elprotronic programming software. At any point in the future after initial purchase, the CMSIS-DAP 2.0 Debugger (XS) product can be upgraded to FlashPro-ARM (XS) or GangPro-ARM (XS).

 

2. Getting Started - Installation

The XS-CMSIS-DAP product package contains:

  1. One XStream-Iso adapter

  2. One 6 feet long USB-A to USB-B cable

  3. FPA to ARM 14-pin to 20-pin and 10 pin adapter (PE036X02) and ribbon cables

The CMSIS-DAP debugging software run under Windows 7 to 10. Follow instruction below to install the software:

  1. Download XS-CMSIS-DAP-win.zip, unzip it and run setup.exe.

  2. The setup wizard appears automatically after clicking setup.exe. Begin the installation process.

  3. Once the installation program starts, on-screen instructions will guide you through the remainder of the installation. You must accept the license agreement before using this software.

2.1 Driver Installation

The installation program will place the USB driver files in Windows directories “Windows\inf" and “Windows\system32\drivers". When the CMSIS-DAP debugging software is installed then by default the drivers are preinstalled automatically. If for any reason the device cannot be seen under Device Manager when the adapter is plugged-in to USB port, then install the drivers manually. Drivers are located in the directory:

  • C:\Program Files (x86)\Elprotronic\Drivers XStream\WIN64

Alternative: Install latest drivers from the website

3. Setup - Main Configuration Utility

The XStream-Iso and XStreamPro-Iso adapters can be configured to run in Elprotronic programmer mode, where they can run regular software, i.e. FlashPro-ARM, or in debugger mode, where they appear as a CMSIS-DAP device. The CMSIS-DAP 2.0 Debugger (XS) product can only appear as a CMSIS-DAP device, unless it is upgraded to FlashPro-ARM (XS) or GangPro-ARM (XS).

Figure 3.1: Main Dialog Screen. This label shows an XStreamPro-Iso adapter with the GangPro-X license. It can run in CMSIS-DAP debugger mode, or as an Elprotronic programmer. The user can switch between these two modes at any time.

3.1 Debugging Mode Selection Overview

The adapter’s working mode is selected in the Adapter Option Selector shown in Figure 3.1. Each of these two working modes uses different USB communication protocols and different USB drivers, therefore only one mode can be used at one time. Elprotronic programming software like the FlashPro-ARM or GangPro-ARM will not detect the adapter if it is in CMSIS-DAP mode. Conversely, debugging IDEs will not see the adapter if it is in Elprotronic programmer mode. Therefore, make sure to select your desired mode of operation before proceeding to production programming or debugging. This mode can be easily verified using Windows' Device Manager.

  • When “Programmer” mode is selected the USB driver can be seen under Device Manager as “XStream (Elprotronic)”, see below:

    Figure 3.2: XStream-Iso adapter in Programmer mode
  • When “CMSIS-DAP Debugger (2.0)” mode is selected the USB driver can be seen under Device Manager as “CMSIS-DAP XStream (Elprotronic)”, see below:

3.2 Getting Started - Configuration Utility

This section will describe how to configure the adapter in Debugger mode:

  1. Connect XStream adapter to PC.

  2. Run the CMSIS-DAP configuration software.

    1. Run XStream CMSIS-DAP shortcut, or the executable directly

    2. C:\Program Files (x86)\Elprotronic\CMSIS-DAP\XS_CMSIS_DAP_cfg.exe

  3. You should see Main GUI with the adapter’s label and selected configuration as seen in Figure 3.1.

  4. Select “CMSIS-DAP Debugger (2.0)” mode in “Adapter Option Selection” box.

  5. Check if the CMSIS-DAP firmware version inside the adapter is the same as the available firmware version in the configuration software. If firmware is not the same or the check sum/PSA is not OK, then press the Update FW button and the firmware inside the XStream adapter will be updated.

  6. The target can be powered by the adapter,

    1. The CMSIS-DAP 2.0 protocol does not explicitly control power supply, but the XStream adapter has the option to supply the target. That is why the user must choose between external power supply or configure the XStream adapter’s output voltage.

    2. Check the “Power from Adapter Enable” box and set Voltage level. The XStream-Iso adapter can supply Vcc from 1.7V to 4.0V, or if the XStreamPro-Iso adapter is used from 1.2V to 4.0.

    3. Change the Vcc Settle time to specify the time from when the power-up of the target is initiated to when other circuits on the target board are stable. The Settle time can be specified in the range from 50 to 300 ms. By, default that time is set to 50 ms. When finished, press the “Save” button to store the configuration inside the XStream adapter.

  7. Save the new configuration. The adapter will now restart; wait a few seconds before the adapter reboots and new settings are detected by the Device Manager.

4. Debugging with IDE

When the XStream adapter is set for CMSIS-DAP debugging mode the adapter is ready to be used with any IDE that supports the CMSIS-DAP 2.0 USB protocol. Below is the setup description for two IDEs that support the CMSIS-DAP 2.0 USB protocol – Keil uVision and IAR EW-ARM.

4.1 Keil uVision

This section describes the steps necessary to run the CMSIS-DAP 2.0 Debugger (XS) with Keil.

  1. Run the Keil uVision 5 or higher

  2. Select Option for Target, see below:

  3. In Tab Debug select the option CMSIS-DAP Debugger.

  4. Press button Settings then the following screen should be displayed, see below:

  5. On the CMSIS-DAP – JTAG/SWD Adapter drop-down menu, XStream-Iso CMSIS-DAP should be selected.

  6. Select desired communication protocol, JTAG or SWD and desired communication speed.

  7. If target device is connected then in the SW Device box, valid IDCODE and Device Name should be displayed.

  8. The XStream adapter is ready for debugging via CMSIS-DAP protocol.

  9. Select and set the Trace option if applicable.

4.2 IAR EW-ARM

This section describes the steps necessary to run the CMSIS-DAP 2.0 Debugger (XS) with IAR.

  1. Run the IAR EW-ARM 9.1 or higher

  2. Select Options->Debugger, see below:

  3. Select the CMSIS DAP Debugger.

  4. Go to CMSIS DAP option setup, see below:

  5. Select Interface type JTAG or SWD and desired communication speed.

  6. The XStream adapter is ready for debugging via CMSIS-DAP protocol.

  7. Select and set the Trace option if applicable.