Contents|Index|Previous|Next
GDB
and Hitachi microprocessors
The following documentaton
discusses using GDB with Hitachi microprocessors.
GDB needs to know the following
things to talk to your Hitachi SH, H8/300, or H8/500.
-
That you want to use ‘target
hms’, the remote
debugging interface for Hitachi microprocessors, or ‘target
e7000’, the in-circuit
emulator for the Hitachi SH and the Hitachi 300H. (‘target
hms’ is the default
when GDB is configured specifically for the Hitachi SH, H8/300, or H8/500.)
-
What serial device connects
your host to your Hitachi board (the first serial device available on your
host is the default).
-
What speed to use over the serial
device.
Connecting
to Hitachi boards
Use the special GDB command
‘deviceport’
if you need to explicitly set the serial device. The default, port,
is the first available port on your host. This is only necessary on Unix
hosts, where it is typically something like /dev/ttya.
GDB has another special command
to set the communications speed: ‘speed
bps’.
This command also is only used from Unix hosts; on DOS hosts, set the line
speed as usual from outside GDB with the DOS modecommand
(for instance, ‘mode
com2:9600,n,8,1,p’
for a 9600 bps connection).
The ‘device’
and ‘speed’
commands are available only when you use a Unix host to debug your Hitachi
microprocessor programs. If you use a DOS host, GDB depends on an auxiliary
terminate-and-stay-resident program called asynctsr
to communicate with the development board through a PC serial port. You
must also use the DOS mode command to set up the serial port on the DOS
side.
Using
the E7000 in-circuit emulator
You can use the E7000 in-circuit
emulator to develop code for either the Hitachi SH or the H8/300H. Use
one of these forms of the ‘target
e7000’ command
to connect GDB to your E7000.
target e7000 port speed
Use this form if your E7000
is connected to a serial port. The port
argument identifies what serial port to use (for example, ‘com2’).
The third argument is the line speed in bits per second (for example, ‘9600’).
target e7000hostname
If your E7000 is installed
as a host on a TCP/IP network, you can just specify its hostname;
GDB uses telnet
to connect.
Special
GDB commands for Hitachi micros
Some GDB commands are available
only on the H8/300 or the H8/500 configurations.
set machine h8300
set machine h8300h
Condition GDB for one of
the two variants of the H8/300 architecture with ‘set
machine’. You
can use ‘show machine’
to check which variant is currently in effect.
set memory mod
show memory
Specify which H8/500 memory
model (mod)
you are using with ‘set
memory’; check
which memory model is in effect with ‘show
memory’. The accepted
values for mod
are small,
big,
medium,
and compact.
Top|Contents|Index|Previous|Next