In the following discussions, we assume you’ve hooked the cable between the PC’s ‘COM1’ port and ‘/dev/ttya’ on the Unix system.
The next step is to set up the PC’s port, by using something like the following in DOS on the PC:
To give control of the PC to the Unix side of the serial line, at the C:\> prompt, type: CTTY com1.
(Later, if you wish to return control to the DOS console, you can use the command CTTY con—but you must send it over the device that had control, in the example, over the ‘COM1’ serial line). From the Unix host, use a communications program such as tip or cu to communicate with the PC; for example, cu -s 9600 -l /dev/ttya.
The cu options shown specify, respectively, the linespeed and the serial port to use. If you use tip instead, your command line may look something like: tip -9600 /dev/ttya.
Your system may require a different name where we show /dev/ttya as the argument to tip. The communications parameters, including which port to use, are associated with the tip argument in the “remote” descriptions file—normally the system table, /etc/remote.
Using the tip or cu connection, change the DOS working directory to the directory containing a copy of your 29K program, then start the PC program, EBMON (an EB29K control program supplied with your board by AMD).
You should see an initial
display from EBMON
similar to the one that follows, ending with the EBMON
prompt, ‘#’—
G:\> CD \usr\joe\work29k
G:\USR\JOE\WORK29K> EBMON
Am29000 PC Coprocessor Board Monitor, version 3.0-18 Copyright 1990 Advanced
Micro Devices, Inc. Written by Gibbons and Associates, Inc.
Enter ’?’ or ’H’ for help
PC Coprocessor Type
= EB29K
I/O Base
= 0x208
Memory Base
= 0xd0000
Data Memory Size
= 2048KB
Available I-RAM Range
= 0x8000 to 0x1fffff
Available D-RAM Range
= 0x80002000 to 0x801fffff
PageSize
= 0x400
Register Stack Size
= 0x800
Memory Stack Size
= 0x1800
CPU PRL
= 0x3
Am29027 Available
= No
Byte Write Available
= Yes
# ˜.
Then exit the cu or tip program (in the example by using ˜. at the EBMON prompt, #). EBMON keeps running, ready for GDB to take over.
For this example, we’ve assumed what is probably the most convenient way to make sure the same 29K program is on both the PC and the Unix system: a PC/NFS connection that establishes “drive G:”on the PC as a file system on the Unix host. If you do not have PC/NFS or something similar connecting the two systems, you must arrange some other way—perhaps floppy-disk transfer—of getting the 29K program from the Unix system to the PC; GDB does not download it over the serial line.
Finally, cd
to the directory containing an image of your 29K program on the Unix system,
and start GDB—specifying as argument the name of your 29K program, as in
the following example.
Now, use the target command, target amd-eb /dev/ttya 9600 MYFOO
In this example, we’ve assumed your program is in a file called ‘myfoo’.
To return control of the PC to its console, use tip or cu once again, after your GDB session has concluded, to attach to EBMON. You can then type the command q to shut down EBMON, returning control to the DOS command-line interpreter. Type CTTY con to return command input to the main DOS console, and type ˜. to leave tip or cu.
The target
amd-eb command
creates a file, ‘eb.log’,
in the current working directory, to help debug problems with the connection.
‘eb.log’
records all the output from EBMON,
including echoes of the commands sent to it. Running ‘tail
-f’ on this file
in another window often helps to understand trouble with EBMON,
or unexpected events on the PC side of the connection.