5.1. Post-mortem debugging

This section describes how to examine the state of a system that has previously been running but is currently not connected to RealView ICE.

Before you can examine a running target with RealView ICE, you must configure the RealView ICE run control unit for that target. If you have a target that is operating without a RealView ICE run control unit connected, and you want to examine it to find out why it is behaving in a particular way, you must power up the RealView ICE run control unit and configure the connection without disturbing the state of the target. This requires that the RealView ICE run control unit is powered before it is connected to the target.

The RealView ICE run control unit includes power conditioning and switching circuitry that enables you to plug and unplug the JTAG cable without affecting the target.

Note

The voltage reference used by the run control unit JTAG circuit is generated from the VTref signal present on the JTAG connector. If this signal is not connected at the target, you must modify the target or the JTAG cable to supply a suitable reference. Connecting VTref to Vsupply is usually sufficient.

To connect to a running target:

  1. Ensure that the JTAG input lines TDI, TMS, nSRST, and nTRST have pull-up resistors (normal practice), and TCK has a pull-down resistor, so that when the adaptor is disconnected from the target these lines are in their quiescent state.

  2. Plug the power jack into the run control unit.

  3. Configure the RealView ICE connection (see Using the RVConfig dialog box). You must do one of the following:

    • load a configuration that you have previously saved

    • manually configure the connection

    • autoconfigure using a separate test system.

    Note

    Do not use autoconfigure on the target to be debugged, because doing so might reset the processor.

  4. If the target processor does not have any CP15 registers, you must explicitly configure the endianness, as described in the RealView Debugger Target Configuration Guide.

    Note

    Do not automatically detect the endianness of target processors that do not have a CP15 register. Doing so might disturb the state of the processor.

  5. Plug the 20-way JTAG cable into the target.

  6. Start the debugger, and connect to the running target.

    In RealView ICE, set the Post Reset State to Running.

    In RealView Debugger, connect using the Connect (Connection Modes) of No Reset / No Stop.

    See Advanced configuration and the RealView Debugger Target Configuration Guide for more details on connection modes.

  7. To get a high-level (source code) view of the problem, you must load the symbol table for your target program into the debugger.

    For RealView Debugger:

    1. Open the Load File to Target dialog box.

    2. Locate the target program.

    3. Select Symbols Only.

    4. Click Open. The Load File to Target dialog box closes.

    See the RealView Debugger User Guide for more details on loading images.

  8. When you have finished, unplug the JTAG connector to restart the system, if required, then exit the debugger.

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