User`s manual
Finding Well Hidden Bugs
Motorola Tips about Special Projects 4-7
4. Tie the output of the second device to the SSI input pin of the first simulated
device.
In the File menu, choose Input, and then select Pins. A dialogue box appears for
you to indicate that you want to tie the output of device 2 to the SSI input of
device 1.
5. Execute your program. For example, click the Go button.
4.3 Finding Well Hidden Bugs
This section suggests techniques for locating well hidden bugs in an application: setting
breakpoints on memory and registers and exploiting hardware breakpoints.
In addition to the software breakpoints we highlighted in other parts of this manual—those
you set by clicking on a line of C code or an assembly instruction—the Suite56 ADS
hardware debugger also supports hardware breakpoints on digital signal processors with
OnCE breakpoint circuitry. In the DSP56300 and DSP56600 families, for example, there
are OnCE facilities for two hardware breakpoints on each device. The DSP56600 family
also has a hardware trace buffer (not to be confused with the software trace facilities for
stepping through code). And the DSP56300, -600, and -800 families have counters to
increment with breakpoints. You access these hardware breakpoint facilities through the
break command or through the graphic user interface, as explained in the following
sections.
4.3.1 Setting Breakpoints on Memory
In Example 3 -14 on page 3-27, we recommend that you produce map files to analyze
where your program is located in memory on your target device. If you discover by
checking the map files produced by your program that your program is blundering into
memory locations on your target device that you did not anticipate, then you should
consider setting a breakpoint on a range of addresses in memory. Likewise, if you suspect
for any other reason that pointers in your program are misdirected toward inappropriate
addresses, consider setting a breakpoint on a range of addresses.
In Section 3.2.3, "Setting Software Breakpoints in a C Program," on page 3-9, we showed
how to set breakpoints in C code, and similarly, in Section 3.3.1, "Setting Breakpoints in
Assembly Code," on page 3-22, we showed how to set them in assembly code.
Breakpoints are equally easy to set on memory locations and on registers, both in a
Suite56 simulator and in a Suite56 ADS debugger. In a Suite56 simulator, in fact, you can
set a series of breakpoints (not just one per execution), and you can set more than one
breakpoint per location (e.g., one to halt, another to increment a counter, another to write
to a log file when execution reaches that location).