Connecting Via Ethernet

Some targets allow GDB to connect via Ethernet - if so, it will be mentioned in the document describing the target. Substitute the target's assigned IP address or hostname for <hostname> in the following. Depending on how RedBoot has been configured, it will either have this address allocated statically, or will acquire it via BOOTP/DHCP. In both cases RedBoot will report the IP address it is listening on in its startup message printed on the serial port. The <port> is the TCP port which RedBoot is listening on, usually 9000. It is also listed in the target document.

Connect to the target by issuing the following command in GDB console mode:

(gdb) target remote <hostname>:<port>

The program may then be loaded and executed, and optionally breakpoints set to make the program halt at specific points to allow debugging. For example:

(gdb) load
Loading section [...]
(gdb) break main
Breakpoint 1 at 0x12345678: file /work/main.c, line 20
(gdb) break file.c:123
Breakpoint 1 at 0x12346000: file /work/file.c, line 123
(gdb) continue

For Eclipse, follow the instructions in the Debugging eCos applications chapter of the Eclipse/CDT for eCos application development manual.

Documentation license for this page: eCosPro License