Page 34 - Embedded Microprocessor Systems Real World Design
P. 34
As microprocessors become more complex, debugging the completed system
becomes more difficult. Many designers, especially at large companies, use an
emulator for system debugging. The emulator has a probe that replaces the micro-
processor IC in the system (the target) and is supposed to run exactly the same as
the target part. However, the emulator allows the engineer to insert breakpoints
into the code so that the microprocessor’s operation can be stopped. While
stopped, the memory, internal registers, and other information about the micro-
processor can be examined, the same as with a monitor program. In a simple emu-
lator, the breakpoint is typically a specific address-for example at the instruction
in the pool timer that turns on the motor relay. More sophisticated emulators have
additional hardware that allows breakpoints when specific values are written or read
to or from memory, when a specific sequence of instructions is executed, or for
many other causes.
One drawback to emulators is their cost. Ranging from a few hundred dollars
for a simple microprocessor (such as the Intel 8031 family) to several thousand
dollars for a more complicated IC, the cost is often prohibitive. As I mentioned
earlier, many companies base several products on a single microprocessor type due
to the cost of buying new emulator equipment.
As microprocessors have grown even faster, their speed has outpaced the emu-
lator industry’s ability to keep up. In addition, the use of more powerful proces-
sors for applications often means some CPU horsepower is left over after the
application is developed. Many developers have moved away from emulators and
back to the monitor or debugger programs. These now more-sophisticated pro-
grams take advantage of leftover CPU capacity to provide event tracing, through-
put measurement, code histograms that show how much time the CPU spends in
each section of code, and other powerful debugging information. In addition,
many processors now include debugging resources onchip. We’ll examine this in
more detail in a later chapter.
Development Costs
In most companies, someone must produce an estimate of the development costs
for a major product. As for any project, these costs include labor and materials.
Estimating these costs is a matter of experience, which is why it usually is left to the
more senior engineers. However, some additional costs must not be forgotten when
developing embedded microcontrollers:
Development systems and development software
PROM or other device programmers
ROM mask charges and other NREs
RTOS licensing fees
System Design 19