UM10413
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2011. All rights reserved.
User manual
Rev. 1 — 16 December 2011
246 of 268
NXP Semiconductors
UM10413
MPT612 User manual
A debugger such as the ARM eXtended Debugger (AXD) or other RealMonitor aware
debugger, that runs on a host computer, can connect to the target to send commands and
receive data. This communication between host and target is illustrated in
The target component of RealMonitor, RMTarget, communicates with the host component,
RMHost, using the Debug Communications Channel (DCC), which is a reliable link whose
data is carried over the JTAG connection.
While the user application is running, RMTarget typically uses IRQs generated by the
DCC. This means that if the user application also wants to use IRQs it must pass any
DCC-generated interrupts to RealMonitor.
To allow non-stop debugging, the EmbeddedICE-RT logic in the processor generates a
Prefetch Abort exception when a breakpoint is reached, or a Data Abort exception when a
watchpoint is hit. These exceptions are handled by the RealMonitor exception handlers
that inform the user, by way of the debugger, of the event. This allows the user application
to continue running without stopping the processor. RealMonitor considers the user
application to consist of two parts:
•
a foreground application running continuously, typically in User, System, or SVC
mode
•
a background application containing interrupt and exception handlers triggered by
certain events in the user system, including:
–
IRQs or FIQs
–
Data and prefetch aborts caused by user foreground application. This indicates an
error in the application being debugged. In both cases, the host is notified and the
user application is stopped.
–
Undef exception caused by the undefined instructions in the user foreground
application. This indicates an error in the application being debugged. RealMonitor
stops the user application until a "Go" packet is received from the host.
If one of these exceptions occurs and not handled by the user application, the following
occurs:
•
RealMonitor enters a loop, polling the DCC. If the DCC read buffer is full, control is
passed to rm_ReceiveData() (RealMonitor internal function). If the DCC write buffer is
free, control is passed to rm_TransmitData() (RealMonitor internal function). If there is
nothing else to do, the function returns to the caller. The ordering of the above
comparisons gives a read from the DCC a higher priority than a write to the
communications link.
Fig 72. RealMonitor as a state machine
aaa-000634
RUNNING
STOPPED
stop
go
PANIC
SWI abort undef
SWI abort undef