Developer’s Manual March, 2003 13-47
Intel
®
80200 Processor based on Intel
®
XScale
™
Microarchitecture
Software Debug
13.15 Halt Mode Software Protocol
This section describes the overall debug process in Halt Mode. It describes how to start and end a
debug session and details for implementing a debug handler. Intel provides a standard Debug
Handler that implements some of the techniques in this chapter. The Intel Debug Handler itself is a
a document describing additional handler implementation techniques and requirements.
13.15.1 Starting a Debug Session
Prior to starting a debug session in Halt Mode, the debugger must download code into the
instruction cache during reset, via JTAG. (Section 13.14, Downloading Code in the ICache). This
downloaded code should consist of:
• a debug handler;
• an override default vector table;
• an override relocated vector table (if necessary).
While the processor is still in reset, the debugger should set up the DCSR to trap the reset vector.
This causes a debug exception to occur immediately when the processor comes out of reset.
Execution is redirected to the debug handler allowing the debugger to perform any necessary
initialization. The reset vector trap is the only debug exception that can occur with debug globally
disabled (DCSR[31]=0). Therefore, the debugger must also enable debug prior to existing the
handler to ensure all subsequent debug exceptions correctly break to the debug handler.
13.15.1.1 Setting up Override Vector Tables
The override default vector table intercepts the reset vector and branches to the debug handler
when a debug exception occurs. If the vector table is relocated, the debug vector is relocated to
address 0xffff0000. Thus, an override relocated vector table is required to intercept vector
0xffff0000 and branch to the debug handler.
Both override vector tables also intercept the other debug exceptions, so they must be set up to
either branch to a debugger specific handler or go to the application’s handlers.
It is possible that the application modifies its vector table in memory, so the debugger may not be
able to set up the override vector table to branch to the application’s handlers. The Debug Handler
may be used to work around this problem by reading memory and branching to the appropriate
address. Vector traps can be used to get to the debug handler, or the override vector tables can
redirect execution to a debug handler routine that examines memory and branches to the
application’s handler.