5.5.1. Debugging from reset

You can use the RealView ICE software to debug systems running in ROM. Typically, when target hardware has an application stored in ROM, and is powered up, it begins running the application. Therefore, when the debugger is started up on the host, the processor on the target is stopped. At this stage, the application can be at any point in its execution lifetime, depending on when the debugger was started.

This means that you can examine the state of the system and restart execution from the current place. In some cases, this is sufficient. However, in many cases it is preferable to restart execution of the application as if from power-on. There are two ways to do this:

When you debug code that is running from ROM, you must ensure that at least one breakpoint unit remains available so that you can set breakpoints on code in ROM, because you cannot use software breakpoints for this purpose. On a processor without vector catch hardware, you must disable semihosting and vector catching as soon as possible after starting up the debugger. This can reduce the chances of the debugger taking these units for its own use.

You must set up any ROM breakpoints before any non-ROM breakpoints are set, so that the breakpoint units do not become full before you attempt to set the ROM breakpoint.

Another factor in debugging a system in ROM is that the ROM image does not contain any debug information. When debugging using the RealView ICE software, symbol or source code information is available by loading the relevant information into the debugger from a file on the host. For example, in RealView Debugger:

  1. Open the Load File to Target dialog box.

  2. Locate the ROM image.

  3. Select Symbols Only.

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

Simulating a reset

You can, where supported, simulate a reset from within the debugger by setting:

  • the pc to the address of the reset vector

  • the CPSR to change into Supervisor mode with interrupts disabled.

This simulates the state of the ARM processor at power-on or reset, but it does not perform post-reset tasks such as resetting the memory map, or initializing any target-specific features such as peripheral registers. It is recommended that you modify these target-specific features to resemble their startup state before executing the application again, if possible. You can automate this procedure using the scripting facilities of RealView Debugger.

Control register reset

Where supported, some cores, particularly CoreSight ones such as the Cortex-M3, include a reset register that can reset the core without using the physical reset lines. In a multi-core system, this can be used to reset only the target core and not the complete system. This type of reset can be selected by setting the reset type to Ctrl_Reg.

Carrying out a real reset

Depending on the design of the reset circuitry, you might be able to carry out a real reset of the board. Two forms of reset are required on the board:

  • a full power-on reset that resets everything on the board

  • a Reset button that resets everything on the board except the EmbeddedICE logic.


The Reset button mentioned here must not be confused with the RST button located on the RVI unit itself, as described in The RealView ICE run control unit.

If your target implements a Reset button that drives nTRST in addition to nSRST, then the EmbeddedICE logic is reset along with the board, and the debugger might not be able to regain synchronization. This design is not recommended. See Chapter 9 System Design Guidelines for more information about the different forms of reset.

If a vector catch is set on the reset vector (or on the start address of the reset code) and the recommended reset circuit is used, when the target is reset, it halts on reset as required.

The ARM Integrator™ boards implement the required two levels of reset. The reset switch carries out the required initialization reset, therefore enabling debug from reset. All that is required is to set the hardware breakpoint, and then press the Reset button.

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