XDS GDB Agent

From Texas Instruments Wiki
Jump to: navigation, search

Overview

XDS GDB Agent enables GDB server like functionality for stop mode debug over a XDS JTAG connection for TI devices. User can connect to a target via JTAG and then launch the XDS GDB Agent on a host PC. The XDS GDB Agent provides GDB RSP (GDB Remote Serial Protocols) interface to a GDB on a specified port (per core) and translates all the GDB debug requests to be performed over XDS JTAG connection.

Software and Installation

Note: release 5.1.642.0 is simply a patch to the XDS GDB Agent that adds the two low-level commands monitor reset and monitor halt.
  • Run the installer as Admin. Select the typical installation and default installation directory.


Launch the XDS GDB Agent Server

Perform the following steps to launch and configure the XDS GDB Agent.

Note: older releases of the emupack have a XDS GDB windows GUI agent. This was removed from later releases but for reference this is shown at the XDS GDB Agent GUI page.
  • The XDS GDB Agent is found in the folder where the EMUPack is installed. If EMUPack is installed in the default directory, it can be found in the folder ‘C:/ti/ccsv6/ccs_base/common/uscif’.
  • Launch the XDS GDB Agent console app
    • Type gdb_agent_console.exe <board-data-file> from ccsv6/ccs_base/common/uscif directory
      • For Linux: Make sure LD_LIBRARY_PATH contains the ccs_base/emulation/drivers and ccs_base/emulation/analysis/bin directories
    • If launched successfully, the output will be seen in the console

GDB console App

Launching multiple instances of the XDS GDB Agent server

If you intend to connect to multiple target devices via different JTAG debuggers, launching multiple instances of the XDS GDB Agent server is required.

However, to uniquely identify each instance the TCP port number must be changed. This is accomplished by the environment variable GDB_AGENT_INIT_PORT

Therefore to be able to run a second instance of the GDB agent open a second console window and adjust the starting port with the following:

C:\ti\ccsv6\ccs_base\common\uscif>set GDB_AGENT_INIT_PORT=56000
C:\ti\ccsv6\ccs_base\common\uscif>gdb_agent_console.exe


Launching GDB

If you have GDB (not provided as part of EMUpack) that supports a core on the target, you can launch GDB to talk to the XDS GDB Agent

  • Launch GDB
  • Type GDB command target remote localhost:<port>. The port number is the same as provided by the XDS GDB agent app or console for a given core

Getting Board Configuration File

If you do not have a board configuration file, you can generate one from Code Composer Studio (CCS) connection setup. It is not recommended to write a board configuration file manually as it requires advanced JTAG scan chain knowledge of the target.

  • Setup a CCS connection for the XDS and the target you are using
  • Connect the XDS and target to the host PC
  • Click on 'Test Connection' from 'Advanced' tab of the target setup view in CCS
  • Check the results for success in the output view. You will also notice path/location of a testBoard.dat file in the results. You can use this file with the XDS GDB Agent

More information on CCS getting started - http://processors.wiki.ti.com/index.php/Category:CCSv5_Training#Getting_Started_Guides