
October 13 1995, Draft 1
370
Addendum to –– Evaluating and Programming the 29K RISC Family
Because debuggers like GDB are available in source form, developers can add
additional debug commands, such as examination of real–time operating system
performance. This would require adding operating system structural information
into GDB. When the debugger front end and, for example, an emulator interface
module, are supplied as a single executable, adding new commands is not possible.
Via the use of Internet sockets the debugger may execute on a different networked
host than the node supporting the emulator control process.
7.5.9 Getting Started with GDB
To demonstrate the operation of GDB debugging a program running on an
Am29000 processor, the program below was compiled using the Free Software
Foundation’s GCC compiler. The example is simple, but it does help to understand
the GDB–MiniMON29K monitor debug mechanism. A stand–alone Am29000
processor development card was used. It contains a UART and space for RAM and
EPROM devices. The MiniMON29K monitor modules were linked with a HIF
operating system support module (OS–boot) and an Am85C30 UART message
driver module [AMD 1988]. The linked image was installed in EPROM devices in
the target hardware. A serial cable was then used to connected the UART to a port on a
SUN–3/80 workstation.
The demonstration could have been equally as well been performed on a
386–based IBM–PC; the target hardware being connected via a PC serial port.
Alternatively, there are a number of manufactures building evaluation cards which
support a dual–ported memory located on a PC plug–in card containing the RISC
processor. The 386 communicates with the target processor via a shared memory
interface. This requires a TIP which can communicate via shared memory with the
DebugCore running on the target hardware. A number of such TIP control processes
have been built. A board developer has only to implement the TIP portion of the
debug mechanism to gain access to a number of debuggers such as GDB which are
UDI conforming. Note, due to an implementation limitation of the current DOS
version of GDB, it is necessary to start the TIP process manually. GDB is unable to
automatically start the
montip
or
isstip
. The command shown below most be used to
start
montip
on a DOS host before GDB can communicate with the target 29K
system.
montip montip.exe
The demonstration program, listed below, simply measures the number of char-
acters in the string supplied as a parameter to the main() function.
main(argc, argv)
int
argc;
char
*argv[];
{
/* program measure.c */