
DSK Communications Kernel
4-10
Debugging functions
Several debugging functions are implemented within the communications ker-
nel by building upon the low-level communications commands. The kernel’s
debugging functions can execute as a background task that is integrated into
the system. Debugging does not halt the system, but allows concurrent execu-
tion of other tasks. Debugging is fast and efficient and requires only a host in-
terface, although it does consume some amount of processor memory and
bandwidth.
In contrast, scan-based emulation, which is another popular debugging meth-
odology, is extremely helpful since it does not consume system memory and
it provides a snapshot in time of the processor(s) in the system. The DSK board
has an MPSD header that allows the use of the XDS510 scan-based emulator.
However, scan-based emulation is a non real-time emulation that requires the
complete system to halt. Due to the low data-transfer rates, it is often inade-
quate for application data transfers. Also, external interrupts are often
masked, and can effectively freeze communications and other interrupt-driven
tasks. Halting and restarting the processor causes many breaks in the CPU
pipeline, which defeats the purpose of real-time operation.
Debugging functions provided in the communications kernel operate as a
background task, and they never disable the CPU or force a pipeline flush. For
example, single-stepping an opcode in scan-based emulation executes the
opcode, flushes the pipeline, and freezes the timers and DMA. On the other
hand, real-time debugging follows standard interrupt service routine rules for
context switching.
Due to the real-time nature of the debugging session, debugging functions
save and restore the context of the CPU before and after executing the debug-
ging function. The kernel implements this
context save similar to a typical inter-
rupt service routine that saves and restores all CPU registers (28 registers).
Peripheral control registers are not preserved, because the communications
kernel does not modify them. Note that the extended-precision CPU registers
require two memory locations to store the most significant 8 bits and the least
significant 32 bits. After saving the context, the CPU enters a spin mode, where
it waits for additional commands. During this time, the context area can be
downloaded, displayed, or modified, usually under the supervision of a host
debugger routine. An XRUNF
or XSTEP command indicates to the CPU that
it needs to restore the context area to its correct running state and then contin-
ue execution. The host accesses the ’C31’s context-save area by looking up
the pointer to the context through the XCTXT command.
Содержание TMS320C3 Series
Страница 1: ...TMS320C3x DSP Starter Kit User s Guide...
Страница 18: ...1 4...
Страница 28: ...2 10...
Страница 82: ...5 18...
Страница 140: ...Communications Kernel Source Code A 12...
Страница 145: ...Schematics B 5 DSK Circuit Board Dimensions and Schematic Diagrams...
Страница 146: ...Schematics B 6...
Страница 147: ...Schematics B 7 DSK Circuit Board Dimensions and Schematic Diagrams...
Страница 148: ...Schematics B 8...
Страница 149: ...Schematics B 9 DSK Circuit Board Dimensions and Schematic Diagrams...
Страница 150: ...Schematics B 10...
Страница 154: ...B 14...
Страница 160: ...C 6...
Страница 166: ...Index 6...