Page 158 - The Art of Designing Embedded Systems
P. 158
Troubleshooting Tools 145
Breakpoints, too, will not have the power and sophistication you
may be used to with an ICE. Most such debuggers won’t permit
nested complex conditions, or pass counters, or even hardware (as
opposed to software) breakpoints.
Trace is probably the biggest loss when moving from an ICE to a
serial debugger. Some tool companies have married logic analyz-
ers to run control BDWJTAG devices. The result is a trace-like
output. . . but only in the cases where the CPU busses are avail-
able and probeable. However, a lot of work is now taking place to
add limited trace capabilities to these products.
ROM Monitors
The oldest of embedded tools is still a viable and useful option for
many projects. The ROM monitor is nothing more than a little bit of code
that is linked into your target firmware. You allocate a communications
port to the tool; it uses this port to interpret commands from the source de-
bugger hosted on your PC.
The ROM monitor is generally a rather simple bit of code. It sends
register and memory info to the PC and accepts downloaded code from the
same source. Breakpoints are simple address-only types.
ROM monitors have the following wonderful attributes:
They’re cheap! The ROM monitor is a simple bit of code. Most of
the cost of the debugger will be in the source-level debugger.
The tool has no physical connection problems. Stick it in any sys-
tem, no matter how fine the SMT pins or how deeply buried the
CPU core lies.
Speed problems just don’t exist, since the monitor is just software
running concurrently with the rest of your code.
The downsides to ROM monitors include:
The tool requires exclusive access to a communications port; if a
ROM monitor is in your future, be sure to add an extra comm port
to the hardware just for the sake of the tool.
The ROM monitor will consume other target resources such as
ROM and RAM, and maybe some interrupts. In a big 32-bit sys-
tem this is rarely a problem. If you’re worlung in a 4k address
space, these resources are usually too scarce to dedicate to the tool.
There’s always a setupkonfiguration problem, as you’ve got to
link the tool into your code and connect it to your proprietary com-
munications port.

