October 13 1995, Draft 1
381
Chapter 7 Software Debugging
UDB does not load symbol information directly from 29K COFF files. The
utility
mksym
(see section 2.6.1) must be used to build a symbol file in a format
understood by UDB. The command below builds a symbol file for the fib.abs COFF
file compiled earlier. It is convenient to place the
mksym
command in the build
makefile.
mksym fib.abs fib.sym
Preparing for UMON Debugging
When MiniMON29K is used to launch UMON, the UMON monitor must first
be installed in the target system memory. Once installed, control of the processor is
passed from the DebugCore to UMON. MonDFE can be used to install UMON. As-
suming the udi_soc file (udiconfs.txt for PC hosts) has an entry “serial” for establish-
ing operation with a 29K target board, MonDFE can be started with the command:
mondfe –D –TIP serial.
Once MonDFE is started, the UMON program can be loaded and execution
started. At this stage MiniMON29K including MonTIP is no longer needed. The
MonDFE command sequence below is all that is needed to get UMON running.
y /udb/umon/sa200/sa200x.abs
g
q
Debugging a program
As noted previously, if MiniMON29K is running on the target 29K system, a
UDB can be started which utilizes a UDI conformant GIO. If UMON is running on
the 29K target system, a non–UDI conformant UDB should be started. Double click-
ing on the UDB29K icon or starting UDB program execution from the command line
will establish a connection with the debug monitor (assuming the udb.rc command
file contains a
mktarget
command). The file udb.rc is read by UDB during the start-
up sequence. It can be used to customize UDB operation.
Once UDB has started, a 29K application program can be loaded. This is done
by using the upper left menu item
File–load–Symbols & Executable
. Then use the
menu item
Execute–Run until
. and enter the label “main” when prompted for an
address; displayed in the window will be the source file, for example see
Figure 7-11. Once a window has been created it can be used to display different
display frames. In Figure 7-11 a source code frame is displayed in the newly created
window. In general, any window can display any frame type. The following
discussion does not strictly adhere to the correct terminology for frames and
windows. In particular, where it is convenient, the term “window” may be used to
refer to a “frame” within a given window.
It is usually necessary to pop–up a window displaying a Console frame to enable
program input/output. This can be done by clicking on the
Con
button (lower right)
while holding down the shift key. A Console window will appear which enables ap-
plication input/output information to be displayed. The keyboard echo option must