Page 159 - The Art of Designing Embedded Systems
P. 159

146  THE ART OF DESIGNING EMBEDDED SYSTEMS


                              The ROM monitor will not work if the hardware is broken.
                              Real-time instrumentation is weak. You just won’t find trace or
                              timing data in any ROM monitor product.


                           ROM Emulators

                           A significant problem with conventional emulators is that they are
                       CPU-specific.  Change from a 68332 to a 68340 and, even though  the
                       processor’s architecture doesn’t change, you’ll need a new emulator-r   at
                       least a new multi-thousand-dollar pod. ROM emulators, instead, connect to
                       your target system via a memory socket. They consist of a RAM array that
                       mimics the ROM chip . . . while allowing you to download new code in a
                       heartbeat. The serial port is built into the unit itself.
                           ROM emulators are so inexpensive that even when using some other
                       debugging tool I keep a few around for those unexpected problems that al-
                       ways seem to surface.
                           ROM emulators continue to play an important role in embedded de-
                       velopment for the following reasons:
                              As ROM replacements they offer convenient overlay RAM. Espe-
                              cially in smaller systems, this may be critical so you can download
                              code, rather than bum a dozen ROMs an hour.
                              Most are very inexpensive-some  go for just a few hundred dol-
                              lars. This means every developer can have a reasonable debugging
                              tool at hand.
                              ROM emulators are processor-independent. The source debugger
                              may change as you move from a 68000 to a 186, but the hardware
                              element remains unchanged.
                              Few, if any, target resources are required.
                           Problems include:

                              Just as with an ICE, speed is an ever-increasing concern.
                              The physical connection to the target system might be difficult if
                              you’re emulating SMT ROM devices. As with ICES, many ven-
                              dors do offer innovative connection strategies, but bear in mind
                              that making a reliable connection may be difficult.
                              The  ROM  socket  does not  provide  any convenient way  to  set
                              breakpoints! About half of the vendors do offer a breakpoint strat-
                              egy;  be  sure  the  one  you  select  won’t  leave  you  breakpoint-
                              starved.
   154   155   156   157   158   159   160   161   162   163   164