Chapter 6. Sourcery G++ Debug Sprite

This chapter describes the use of the Sourcery G++ Debug Sprite for remote debugging. The Sprite allows you to debug programs running on a bare board without an operating system. This chapter includes information about the debugging devices and boards supported by the Sprite for MIPS ELF.

Table of Contents

6.1. Probing for Debug Devices
6.2. Debug Sprite Example
6.3. Invoking Sourcery G++ Debug Sprite
6.4. Sourcery G++ Debug Sprite Options
6.5. MDI Devices
6.6. Debugging a Remote Board
6.7. Supported Board Files
6.8. Board File Syntax

Sourcery G++ Lite contains the Sourcery G++ Debug Sprite for MIPS ELF. This Sprite is provided to allow debugging of programs running on a bare board. You can use the Sprite to debug a program when there is no operating system on the board, or for debugging the operating system itself. If the board is running an operating system, and you wish to debug a program running on that OS, you should use the facilities provided by the OS itself (for instance, using gdbserver).

The Sprite acts as an interface between GDB and external debug devices and libraries. Refer to Section 6.3, “Invoking Sourcery G++ Debug Sprite” for information about the specific devices supported by this version of Sourcery G++ Lite.

Important

The Sourcery G++ Debug Sprite is not part of the GNU Debugger and is not free or open-source software. You may use the Sourcery G++ Debug Sprite only with the GNU Debugger. You may not distribute the Sourcery G++ Debug Sprite to any third party.

6.1. Probing for Debug Devices

Before running the Sourcery G++ Debug Sprite for the first time, or when attaching new debug devices to your host system, it is helpful to verify that the Sourcery G++ Debug Sprite recognizes your debug hardware. From the command line, invoke the Sprite with the -i option:

> mips-sde-elf-sprite -i

This prints out a list of supported device types. For devices that can be autodetected, it additionally probes for and prints out a list of attached devices. For instance:

CodeSourcery MIPS Debug Sprite (Sourcery G++ Lite 4.4-124)
mdi: [lib=<file>&cfg=<file>&rst=<n>] MDI device
  mdi:/23/1 - 24KE     (Instruction)/24KE LE
  mdi:/23/2 - 24KE     (Instruction)/24KE BE
  mdi:/24/1 - 24KE     (Cycle)/24KE LE
  mdi:/24/2 - 24KE     (Cycle)/24KE BE
  mdi:/$Target/$Device - Generic MDI target/device

This shows that MDI (Microprocessor Debug Interface) devices are supported. Four MIPSsim devices have been autodetected. Note that additional configuration steps for the MDI library are required to allow the Sprite to autodetect devices; see Section 6.5, “MDI Devices”.