Chapter 20. Configuration-Specific Information
169
20.3.2. Hitachi H8/300
target hms
dev
A Hitachi SH, H8/300, or H8/500 board, attached via serial line to your host. Use special com-
mands
device
and
speed
to control the serial line and the communications speed used.
target e7000
dev
E7000 emulator for Hitachi H8 and SH.
target sh3
dev
target sh3e
dev
Hitachi SH-3 and SH-3E target systems.
When you select remote debugging to a Hitachi SH, H8/300, or H8/500 board, the
load
command
downloads your program to the Hitachi board and also opens it as the current executable target for
gdb on your host (like the
file
command).
gdb needs to know these things to talk to your Hitachi SH, H8/300, or H8/500:
1. 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.)
2. what serial device connects your host to your Hitachi board (the first serial device available on
your host is the default).
3. what speed to use over the serial device.
20.3.2.1. Connecting to Hitachi boards
Use the special
gdb
command
device
port
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
mode
command (for instance,
mode com2:9600,n,8,1,p
for a 9600bps 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.
The following sample session illustrates the steps needed to start a program under gdb control on an
H8/300. The example uses a sample H8/300 program called
t.x
. The procedure is the same for the
Hitachi SH and the H8/500.
First hook up your development board. In this example, we use a board attached to serial port
COM2
;
if you use a different serial port, substitute its name in the argument of the
mode
command. When you
call
asynctsr
, the auxiliary comms program used by the debugger, you give it just the numeric part
of the serial port’s name; for example,
asyncstr 2
below runs
asyncstr
on
COM2
.
C:\H8300\TEST
I
asynctsr 2
C:\H8300\TEST
I
mode com2:9600,n,8,1,p
Resident portion of MODE loaded
Summary of Contents for ENTERPRISE LINUX 4 - DEVELOPER TOOLS GUIDE
Page 1: ...Red Hat Enterprise Linux 4 Debugging with gdb ...
Page 12: ...2 Chapter 1 Debugging with gdb ...
Page 28: ...18 Chapter 4 Getting In and Out of gdb ...
Page 34: ...24 Chapter 5 gdb Commands ...
Page 44: ...34 Chapter 6 Running Programs Under gdb ...
Page 68: ...58 Chapter 8 Examining the Stack ...
Page 98: ...88 Chapter 10 Examining Data ...
Page 112: ...102 Chapter 12 Tracepoints ...
Page 118: ...108 Chapter 13 Debugging Programs That Use Overlays ...
Page 138: ...128 Chapter 14 Using gdb with Different Languages ...
Page 144: ...134 Chapter 15 Examining the Symbol Table ...
Page 170: ...160 Chapter 19 Debugging remote programs ...
Page 198: ...188 Chapter 21 Controlling gdb ...
Page 204: ...194 Chapter 22 Canned Sequences of Commands ...
Page 206: ...196 Chapter 23 Command Interpreters ...
Page 216: ...206 Chapter 25 Using gdb under gnu Emacs ...
Page 296: ...286 Chapter 27 gdb Annotations ...
Page 300: ...290 Chapter 28 Reporting Bugs in gdb ...
Page 322: ...312 Chapter 30 Using History Interactively ...
Page 362: ...352 Appendix D gdb Remote Serial Protocol ...
Page 380: ...370 Appendix F GNU GENERAL PUBLIC LICENSE ...
Page 386: ...376 Appendix G GNU Free Documentation License ...
Page 410: ......