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 debug hardware 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. The following figure shows the configuration:

Figure 53. RVI-GDB connections

To view this graphic, your browser must support the SVG format. Either install a browser with native support, or install an appropriate plugin such as Adobe SVG Viewer.


Note

GDB does not support Semihosting over JTAG. Therefore, any prompts and messages that are output by the application cannot be displayed in your debugger.

Show/hideRVI-GDB Scenarios

Use the RVI-GDB connection method to:

  • perform run and stop debugging of a single ARM processor

  • perform run and stop debugging with GDB at the same time as debugging the application. That is, for example, if connecting to a target with a GDB stub (Target-GDB connections), or if your target application requires TCP/IP communication with the debug host (Target-GDB-Virtual Ethernet connections).

Note

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

Show/hidePrerequisites

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

Show/hideProcedure

If your application does not have GDB support linked-in, you can use the GDB protocol built into the debug hardware 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 a RVI-GDB connection:

  1. Power-up your target hardware and debug hardware unit.

  2. Configure the processor 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 processor (using port 4000 of debug hardware 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 processor, and an image can be loaded and debugged.

    Note

    To load and boot a complete system, use the rviload utility.

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

Show/hideSee also

Copyright © 2010-2012 ARM. All rights reserved.ARM DUI 0498G
Non-ConfidentialID071612