8.2.2. Connections to a target without built-in GDB support (RVI-GDB)

These are connections to targets where no GDB stub has been built into the target application, or when you want to perform halt-mode debugging. Connections of this type use the built-in GDB protocol interpreter of RealView ICE to control the CPU directly, and are referred to as RVI-GDB connections. When you want to examine the internal state of the CPU (such as registers, memory, and variables), the image on the target stops executing. After examining the required state, you must start the image again. Figure 8.1 shows the configuration.

Note

Because this method does not use the DCC semihosting mechanism, any prompts and messages that are output by the application cannot be displayed.

Figure 8.1. RVI-GDB connections


RVI-GDB Scenarios

Use the RVI-GDB connection method to:

Note

When the image stops, so does the handling of interrupt routines. This might not always be desirable when debugging a real-time system.

RVI-GDB Requirements

To use the RVI-GDB connection method, it is recommended that you compile your target application using a GNU toolchain for ARM architectures (see The GNU toolchain for ARM architectures).

Procedure for debugging applications through RVI-GDB connections

If your application does not have GDB support linked-in, you can use the GDB protocol built into the RealView ICE unit to debug your application. However, this controls the CPU directly, and the CPU stops whenever you want to examine its internal state.

To debug an application through an RVI-GDB connection:

  1. Power up your target hardware and RealView ICE unit.

  2. Configure the core using rvconfig, using either automatic or manual configuration. Save the rvc file in a convenient location.

  3. Run rvigdbconfig, specifying the rvc file that was created in step 2: rvigdbconfig –f rvi.rvc

  4. Start GDB, load the symbols if required, and connect to the first core (using port 4000 of RealView ICE in this example):

    arm-elf-gdb(gdb) file demo.elf
    (gdb) target remote rvi5:4000
    Remote debugging using rvi5:4000 
    0x00000000 in $a ()
    (gdb)
    

    GDB is now connected to the core, and an image can be loaded and debugged.

    For information on connecting to more than one core, see Port numbering.

    Note

    To load and boot a complete system, use the rviload utility (see Loading and booting a complete system).

  5. Set up any breakpoints or other debugging features, then run the application. Debug your application in the usual way.

Copyright © 2002, 2004-2008 ARM Limited. All rights reserved.ARM DUI 0155J
Non-Confidential