09.12.2012 Views

Cortex-A8 Technical Reference Manual - ARM Information Center

Cortex-A8 Technical Reference Manual - ARM Information Center

Cortex-A8 Technical Reference Manual - ARM Information Center

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

12.2 About the debug unit<br />

12.2.1 Halting debug-mode debugging<br />

12.2.2 Monitor debug-mode debugging<br />

Debug<br />

The processor debug unit assists in debugging software running on the processor. You can use<br />

the processor debug unit, in combination with a software debugger program, to debug:<br />

• application software<br />

• operating systems<br />

• hardware systems based on an <strong>ARM</strong> processor.<br />

The debug unit enables you to:<br />

• stop program execution<br />

• examine and alter processor and coprocessor state<br />

• examine and alter memory and input/output peripheral state<br />

• restart the processor core.<br />

You can debug software running on the processor in the following ways:<br />

• Halting debug-mode debugging<br />

• Monitor debug-mode debugging<br />

• trace debugging, see Chapter 14 Embedded Trace Macrocell.<br />

The processor external debug interface is compliant with the AMBA 3 APB Protocol<br />

Specification.<br />

When the processor debug unit is in Halting debug-mode, the processor halts when a debug<br />

event, such as a breakpoint, occurs. When the processor is halted, an external debugger can<br />

examine and modify the processor state using the APB interface. This debug mode is invasive<br />

to program execution.<br />

When the processor debug unit is in Monitor debug-mode and a debug event occurs, the<br />

processor takes a debug exception instead of halting. A special piece of software, a monitor<br />

target, can then take control to examine or alter the processor state. Monitor debug-mode is<br />

essential in real-time systems where the processor cannot be halted to collect debug information.<br />

Examples of these systems are engine controllers and servo mechanisms in hard drive<br />

controllers that cannot stop the code without physically damaging the components.<br />

When execution of a monitor target starts, the state of the processor is preserved in the same<br />

manner as all <strong>ARM</strong> exceptions. The monitor target then communicates with the debugger to<br />

access processor and coprocessor state, and to access memory contents and input/output<br />

peripherals. Monitor debug-mode requires a debug monitor program to interface between the<br />

debug hardware and the software debugger.<br />

Note<br />

Monitor debug-mode, used for debugging, is not the same as Secure Monitor mode, that is a<br />

CPSR[4:0] processor mode.<br />

See CP14 c1, Debug Status and Control Register on page 12-15 for information on how to select<br />

between Halting debug-mode or Monitor debug-mode.<br />

<strong>ARM</strong> DDI 0344K Copyright © 2006-2010 <strong>ARM</strong> Limited. All rights reserved. 12-3<br />

ID060510 Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!