Embedded Systems Design: An Introduction to Processes, Tools, and Techniques

Traditionally, the debug kernel has been implemented in firmware. Thus, for the kernel to execute correctly on new hardware, the new design must at least get the processor memory interface correct. Unfortunately, as clock speeds increase and memory systems grow in size and complexity, this interface has become more and more demanding to engineer, which raises a question how you can debug the system when you can t rely on the system to execute even the debug kernel?
Increasing levels of integration create a related problem: How do you modify firmware when it s embedded on a chip in which you can t use a ROM emulator?
To address these and other related issues, chip vendors are beginning to supply hardware implementations of the debug kernel as part of the chip circuitry. When the functionality of the debug kernel is part of the chip circuitry, debugging tools can continue to deliver run control and to monitor system resources even if the processor chip isn t able to communicate with the rest of the board. This robustness makes it much easier to determine whether intermittent glitches are hardware or software problems.
Putting debug control directly in the processor solves other problems, too. In chips with sophisticated pipelines and complex caches, integral debug circuitry can report processor state without concern for the cache and pipeline visibility problems that limit logic analyzers. Well-designed debug interfaces can reduce the overall package pin count. Also, when implemented in silicon, the debug core can t be accidentally destroyed by software that...