30.01.2015 Views

UM10211 - Standard ICs

UM10211 - Standard ICs

UM10211 - Standard ICs

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

NXP Semiconductors<br />

<strong>UM10211</strong><br />

Chapter 31: LPC2300 RealMonitor<br />

3.2 How RealMonitor Works<br />

In general terms, the RealMonitor operates as a state machine, as shown in<br />

Figure 31–114. RealMonitor switches between running and stopped states, in response to<br />

packets received by the host, or due to asynchronous events on the target. RMTarget<br />

supports the triggering of only one breakpoint, watchpoint, stop, or semihosting SWI at a<br />

time. There is no provision to allow nested events to be saved and restored. So, for<br />

example, if user application has stopped at one breakpoint, and another breakpoint<br />

occurs in an IRQ handler, RealMonitor enters a panic state. No debugging can be<br />

performed after RealMonitor enters this state.<br />

SWI abort<br />

undef<br />

stop<br />

SWI abort<br />

undef<br />

RUNNING STOPPED PANIC<br />

go<br />

Fig 114.RealMonitor as a State Machine<br />

A debugger such as the ARM eXtended Debugger (AXD) or other RealMonitor aware<br />

debugger, that runs on a host computer, can connect to the target to send commands and<br />

receive data. This communication between host and target is illustrated in Figure 31–113.<br />

The target component of RealMonitor, RMTarget, communicates with the host component,<br />

RMHost, using the Debug Communications Channel (DCC), which is a reliable link whose<br />

data is carried over the JTAG connection.<br />

While user application is running, RMTarget typically uses IRQs generated by the DCC.<br />

This means that if user application also wants to use IRQs, it must pass any<br />

DCC-generated interrupts to RealMonitor.<br />

To allow nonstop debugging, the EmbeddedICE-RT logic in the processor generates a<br />

Prefetch Abort exception when a breakpoint is reached, or a Data Abort exception when a<br />

watchpoint is hit. These exceptions are handled by the RealMonitor exception handlers<br />

that inform the user, by way of the debugger, of the event. This allows user application to<br />

continue running without stopping the processor. RealMonitor considers user application<br />

to consist of two parts:<br />

• A foreground application running continuously, typically in User, System, or SVC<br />

mode<br />

• A background application containing interrupt and exception handlers that are<br />

triggered by certain events in user system, including:<br />

– IRQs or FIQs<br />

– Data and Prefetch aborts caused by user foreground application. This indicates an<br />

error in the application being debugged. In both cases the host is notified and the<br />

user application is stopped.<br />

<strong>UM10211</strong>_1<br />

© NXP B.V. 2007. All rights reserved.<br />

User manual Rev. 01 — 27 March 2007 572 of 613

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

Saved successfully!

Ooh no, something went wrong!