Go to the first, previous, next, last section, table of contents.

Debugging on Fujitsu SPARClite targets

GDB needs to know these things to talk to your Fujitsu SPARClite:

  1. that you want to use:
  2. what serial device connects your host to your Fujitsu SPARClite board (the first serial device available on your host is the default).
  3. what speed to use over the serial device.

Use one of these GDB commands to specify the connection to your target board:

target sparclite port
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 sparclite port', where port is the name of the serial port connected to the board. If the program has not already been downloaded to the board, use the load command to download it. For example, this sequence connects to the target board through a serial port, and loads and runs a program called prog through the debugger:
(gdb) target sparclite com1
[SPARClite appears to be alive]
(gdb) load
[Loading section .text at 0x40000000 (9160 bytes)]
[Loading section .data at 0x400023c8 (96 bytes)]
[Starting hello at 0x40000020]
target sparclite allows loading, but no other operations. This sequence uses target remote to debug:
(gdb) target remote com1
Remote debugging using com1
breakinst () ../sparcl-stub.c:975
975     }
(gdb) s
main () hello.c:50
50        writez(1, "Got to here\n");
(gdb) 
target sparclite hostname:portnumber
You can specify a TCP/IP connection instead of a serial port, using the syntax hostname:portnumber (assuming your SPARClite 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 remotedebug variable.


Go to the first, previous, next, last section, table of contents.