TI XDS Debugger User's Guide: TI XDS Debugger User's Guide

Keil, An ARM® Company TI XDS Debugger User's Guide

The TI XDS Debugger User's Guide describes the configuration options for the TI XDS Debugger driver implemented in µVision. The driver can be used to flash and debug applications on Cortex-M processor-based devices. The TI XDS Debugger is a software component that executes on a host computer and connects to the debug unit of the target hardware via USB.

This manual contains the following chapters:

  • About TI XDS Debugger describes the driver features and MDK version requirements.
  • Install TI XDS Emulators supported by the TI XDS Debugger driver.
  • Configure Debugger Driver in µVision and setup the options for downloading and debugging applications.
  • Using the Debugger describes the steps for downloading an application to Flash and starting a debugging session.

Revision History

  • April 2016 - Initial Revision

Copyright © Keil, An ARM Company. All rights reserved.


TI XDS Debugger User's Guide: Configure for Tracing

Configure for Tracing

Trace Configuration options are set in the dialog Target Driver Setup - Trace and define the way trace events are generated and captured.

At the time being, only the Core Clock can be set in this dialog for the Data Watch Point Unit. No other tracing information is delivered using the TI XDS Debugger.

To set the Core Clock for tracing:

  1. Open the dialog Options for Target — Debug, enable Use and select TI XDS Debugger.

  2. Click on Settings to open the Target Driver Setup dialog, and click on the Trace tab.

    Setup - Trace

Set the Core Clock value according to the application system core clock.


TI XDS Debugger User's Guide: Configure for Debugging

Configure for Debugging

Configure the TI XDS Debugger for debugging applications:

  1. Open the dialog Options for Target — Debug, enable Use: and select TI XDS Debugger from the drop-down list.

    Select Target Driver

  2. Click on Settings to fine-tune the debugging behavior with the next dialog Debug.

    Target Driver Setup

    The dialog consists of groups with information and configuration settings:

    • Debug Adapter
    • SW Device / JTAG Device Chain
      This group depends on the selected Port, either SW or JTAG.
    • Debug


TI XDS Debugger User's Guide: Configure Debugger Driver

Configure Debugger Driver

To configure the TI XDS Debugger driver in µVision:

  • Configure for Debugging
    Set options for debugging applications that run on target hardware.
  • Configure for Tracing
    Set the core clock for capturing Data Watchpoints.
  • Flash Download Configuration
    Define the behavior when downloading applications to target.


TI XDS Debugger User's Guide: Debug Adapter

Debug Adapter

Debug Adapter The section Debug Adapter displays driver, device, and firmware information.

SWJ enables the driver to switch between JTAG and Serial Wire (SW) mode.

Port sets the internal debugging interface: SW (default) or JTAG. In case a port type is not supported, the dialog shows corresponding error messages. In addition, the fields displaying driver characteristics are grayed out. This setting steers the information in the section SW Device / JTAG Device Chain.

Max Clock sets the debugging clock rate for communicating to the target board.


TI XDS Debugger User's Guide: SW/JTAG Device

SW/JTAG Device

This dialog section informs about the connected target device. Depending on the selected Port, it shows credentials of the SW Device or the JTAG Device Chain.

SW Device shows one or more debug targets connected through the Serial Wire interface. The IDCODE and Device Name are displayed automatically for each device.

JTAG Device Chain shows one or more debug targets connected through the JTAG interface. The IDCODE, Device Name, and IR Length are displayed automatically for each device. Manual Configuration allows identifying undetected JTAG devices. Specify the instruction register length (IR len) of each device in the JTAG device chain.

  • In case of an error, change the settings of the field Port or select another Debug Adapter.


TI XDS Debugger User's Guide: Debug

Debug

The Debug section provides controls for connecting and reseting the device, and caching and downloading the code. The settings are applied each time a debugging session is started.

Connect & Reset Options

Connect & Reset Options control the instructions executed while connecting to target.

Connect and Reset Options

Connect - controls the operations that are executed when the µVision debugger connects to the target device. The drop-down has the following options:

  • Normal just stops the CPU at the currently executed instruction after connecting.
  • with Pre-reset applies a hardware reset(HW RESET) before connecting to the device.
  • under Reset holds the hardware reset(HW RESET) signal active while connecting to the device. Use this option when the user program disables the JTAG/SW interface by mistake.

Reset after Connect (if enabled) performs a reset operation as defined in the Reset drop-down list (see below), after connecting to the target. When disabled, the debugger just stops the CPU at the currently executed instruction after connecting.

Reset controls the reset operations performed by the target device.

  • Autodetect selects one of the reset methods based on the target device. If Autodetect finds an unknown device, it uses the SYSRESETREQ method.
  • HW RESET performs a hardware reset by asserting the hardware reset (HW RESET) signal.
  • SYSRESETREQ performs a software reset by setting the SYSRESETREQ bit. The Cortex-M core and on-chip peripherals are reset.
  • VECTRESET performs a software reset by setting the VECTRESET bit. Only the Cortex-M core is reset. On-chip peripherals are not reset. For some Cortex-M devices, VECTRESET is the only way they may be reset. However, VECTRESET is not supported on Cortex-M0, Cortex-M0+, and Cortex-M1 cores.

Cache Options

Cache Options improve the µVision debugger performance during target debugging by caching target memory areas into the PC memory. By default, caching options are enabled to get maximum performance.

Cache Code informs the debugger that the downloaded program code will not change. When this option is set, µVision never reads the program code from the target system. Disable this option when the application includes self-modifying code or the program code might get overwritten.

Cache Memory determines whether memory displays are updated during a program stop. When this option is set, the debugger does not update memory displays until the execution of the next single step, procedure step, or go command. Disable this option to display the actual memory content (for example, the content of memory mapped peripherals) when the debugger is halted.

Download Options

Download Options control the downloading of code to the target system when starting a debugging session.

Verify Code Download compares the content of the target memory with the application program loaded in the debugger for each new debug session. Enable this option to ensure program correlation between the image loaded in target system and the image loaded in the µVision debugger. This prevents debugging the wrong code when working with various targets or more instances of µVision.

Download to Flash downloads code to all memory regions. When disabled, the debugger does not download code to the memory Address Range defined in the dialog Programming Algorithms. Enable the option if the application is loaded into RAM and the Flash algorithm is defined for the same address range. By default, this option is disabled. Refer to the knowledgebase article µVision Debugger: Error 57: Illegal Address in Debugger Output Window.


TI XDS Debugger User's Guide: Install TI XDS Emulators

Install TI XDS Emulators

MDK version 5.20 (and later) supports TI Emulators through the TI XDS Debugger driver. To install support for TI Emulators:

  1. Download the latest emulator software package from the TI webpage http://processors.wiki.ti.com/index.php/XDS_Emulation_Software_Package.
  2. After the download, run the executable as administrator. Follow the instructions of the installation wizard on the screen.

    Attention: You must install the TI XDS Emulation library in the folder C:\ti regardless whether you have installed it already in another folder.

    XDS Install Wizard

Verify Installation

You can verify the installation with the Windows Device Manager.

  1. Connect a board, for example MSP432P401R LaunchPad, to the working station and wait for Windows to install the drivers.
  2. Open the Device Manager. A new device group Texas Instruments Debug Probes should be visible. In some cases, you might find entries in the group Universal Serial Bus controllers.


TI XDS Debugger User's Guide: About TI XDS Debugger

About TI XDS Debugger

The TI XDS Debugger driver, delivered by Keil, connects to the Texas Instruments XDS110 debug probe.

The TI XDS110 debug probe is a low cost embedded MCU JTAG adapter for Texas Instruments microcontrollers and embedded processors. Currently, the driver supports the TI XDS110 debug probe only on the TI MSP432 LaunchPad.

Required MDK version

  • MDK V5.20, or later

Supported Features

  • JTAG (IEEE 1149.1), cJTAG (IEEE 1149.7), ARM SWD (Serial Wire Debug)
  • Interface compliant with CMSIS-DAP
  • Cortex-M devices
  • OS integrated USB driver. USB 2.0 FS default and HS optional for higher performance

Note

  • Refer to XDS110 on the Texas Instruments wiki page for more information about the debug probe.
  • Example applications can be downloaded from the Application Note 276: Using the MSP432 LaunchPad evaluation board.


TI XDS Debugger User's Guide: Debugging Applications

Debugging Applications

Follow the steps to debug applications:

  1. Connect the target board to the PC using a USB cable.
  2. Configure for Debugging.
  3. Start/Stop Debug Session to start debugging the application.

Note

  • If the flag Update Target before Debugging is set, then the debugger loads the application to target prior to starting a debugging session.
  • Details about debugging features are explained in the µVision User's Guide chapter Debugging, and in the Getting Started User's Guide chapter Start Debugging.


TI XDS Debugger User's Guide: Download Function

Download Function

The section Download Function defines Flash operations that are executed whenever an application is downloaded to Flash.

Flash Download Setup - Download Function

One of the Erase functions must be selected:

  • Erase Full Chip erases all Flash memory on the device prior to program download.
  • Erase Sectors erases only the sectors used by the program to be downloaded.
  • Do Not Erase No Flash is erased.

Choose from the Program functions to:

  • Program Flash ROM with the current µVision project program file.
  • Verify that the application downloaded to Flash matches the µVision application and the download succeeded.
  • Reset and Run the application on target after the download and verification completed.


TI XDS Debugger User's Guide: Downloading to Flash

Downloading to Flash

The TI XDS Debugger driver allows you to program the Flash memory of the target system:

  1. Connect the target board to the PC using a USB cable.
  2. Setup the Flash Download Configuration.
  3. Click the button Download to Flash to program the application to target.

    The Status Bar shows the download progress, whereas the Build Output window shows the individual downloading steps.

Thereafter, the application can be debugged on target.


TI XDS Debugger User's Guide: Flash Download Configuration

Flash Download Configuration

Configure the TI XDS Debugger to download applications to target.

  1. Open the dialog Options for Target — Utilities, enable Use Target Driver for Flash Programming and select Use Debug Driver.

    Select Target Driver

  2. Optionally, enable Update Target before Debugging to download the application to target whenever a new debugging session is started. The download is executed only when the binary was updated since the last Flash programming step (this avoids unnecessary reprogramming sequences).

    • When switching between µVision instances, use the explicit DownlodButton Load button to ensure the image of the current target is downloaded to Flash.

    • When Update Target before Debugging is disabled and the application was not downloaded manually to Flash, you can enable the option Options for Target — Debug — Settings — Debug — Verify Code Download to ensure program correlation between the target system and the µVision debugger.
  3. Click on Settings to fine-tune download options or add Flash programming algorithms.

    Select Flash Algorithms

    The dialog Flash Download Setup consists of the following configuration groups:

    • Download Function sets the Flash operations.
    • RAM for Algorithm defines the Flash algorithm address space.
    • Programming Algorithm sets the Flash programming algorithms.


TI XDS Debugger User's Guide: Programming Algorithm

Programming Algorithm

The section Programming Algorithm contains the definitions for programming Flash. This includes configuration parameters for size, address space, and device type.

Flash Programming Setup - Programming Algorithm

  1. Click Add to include a new device and programming algorithm from a list of supplied algorithms. Normally, this step is sufficient.
  2. If required by the application, change the value of the fields:
    • Start address of the Flash device. You may change the address only for an external flash. For an internal flash, the start address should not be changed.
    • Size of the Flash device.

Click Remove to exclude the highlighted device.

Note

  • In certain cases it might be required using the flag Download to Flash - explained in Debug.


TI XDS Debugger User's Guide: RAM for Algorithm

RAM for Algorithm

The section RAM for Algorithm defines the address space where programming algorithms are loaded and executed. Usually, the address space is located in on-chip RAM.

Flash Download Setup - RAM for Algorithm

  • Start is the starting address of the RAM area.
  • Size is the length of this RAM area (in bytes).


TI XDS Debugger User's Guide: Supplied Algorithms

Supplied Algorithms

The list Add Flash Programming Algorithm shows programming algorithms for a device, device memory size, device type, and the origin of the algorithm. The field at the bottom of the list displayes the file location of the selected programming algorithm.

Add Flash Programming Algorithm Dialog

Highlight an algorithm and click Add to include the device to the project.


TI XDS Debugger User's Guide: Using the Debugger

Using the Debugger

After you have configured the debugger driver, download the application to target and start debugging.

  • Download to Flash
    Program the application to the target system.
  • Debug Applications
    Start debugging the application on target.