Contents|Index|Previous|Next

Debugging on Motorola m68k targets

gdb needs to know the following specifications to talk to your Motorola m68k.

- Specifications for wanting to use one of the following interfaces:

target rom68k
ROM monitor for the IDP board.

target cpu32bug
ROM monitor for other Motorola boards, such as the Motorola Business Card Computer, BCC.

target est
EST Net/300 emulator.

target remote
gdb’s generic debugging protocol.

- Specifications for what serial device connects your host to your m68k board (the first serial device available on your host is the default).
- Specifications for what speed to use over the serial device.

Use the following gdb commands to specify the connection to your target board.

target interface serial-device
To run a program on the board, start up gdb with the name of your program as the argument. To connect to the board, use the command, target interface serial-device, where interface is an interface from the previous list of specifications and serial-device is the name of the serial port connected to the board. If the program has not already been downloaded to the board, you may use the load command to download it. You can then use all the usual gdb commands. For example, the following sequence connects to the target board through a serial port, and loads and runs a program called prog through the debugger.

    host$ m68k-coff-gdb prog
    GDB is free software and...
    (gdb) target cpu32bug /dev/ttyb
    ...
    (gdb) load
    ...
    (gdb) run

target m68k hostname: portnumber
You can specify a TCP/IP connection instead of a serial port, using the syntax, hostname: portnumber (assuming your board is connected so that this makes sense; for instance, to a serial line managed by a terminal concentrator).

gdb also supports set remotedebug n. You can see some debugging information about communications with the board by setting the variable, remotedebug.