GDB Server

The J-Link GDB Server is a remote server for the GDB which allows to use J-Link with GDB or any toolchain which uses GDB as debugging interface, such as Yagarto and Sourcery G++). The GDB and GDB Server communicate via a TCP/IP connection, using the standard GDB remote serial protocol. The GDB supports a standard set of commands like open elf/bin files, reading/writing memory, etc. Beside this, the GDB also supports so called monitor commands which are passed to the GDB Server and interpreted by it, allowing it to implement J-Link specific commands like reading/writing CP15 registers, enabling flash download via J-Link, using flash breakpoints, enabling semihosting, etc.

GNU Project Debugger (GDB) overview

The GNU Project Debugger (GDB) is a freely available debugger, distributed under the terms of the GNU Public license (GPL). It connects to an emulator via a TCP/IP connection. It can connect to every emulator for which a GDB server software is available. The latest Unix version of the GDB is freely available from the GNU commitee under: http://www.gnu.org/software/gdb/download/

Supported cores

Currently the J-Link GDB Server can be used with the following CPU cores:

  • ARM7TDMI (Rev 1)
  • ARM7TDMI (Rev 3)
  • ARM7TDMI-S (Rev 4)
  • ARM720T
  • ARM920T
  • ARM922T
  • ARM926EJ-S
  • ARM946E-S
  • ARM966E-S
  • ARM1136JF-S
  • ARM1136J-S
  • ARM1156T2-S
  • ARM1156T2F-S
  • ARM1176JZ-S
  • ARM1176JZF
  • ARM1176JZF-S
  • Cortex-A5
  • Cortex-A8
  • Cortex-A9
  • Cortex-M0
  • Cortex-M1
  • Cortex-M3
  • Cortex-M4
  • Cortex-R4

Requirements

To use the J-Link GDB Server, you have to meet the following requirements:

User interface

The J-Link GDB Server's user interface shows information about the debugging process and allows the user to configure some settings like target endianess, if memory reads should be cached in order to improve performance or if a logfile shall be generated.

Setting up the J-Link GDB Server

Typically, most of the GDB and target setup is done from GDB via remote commands (monitor) in the .gdbinit file. The commands used in the .gdbinit file are performed before the download of the application into the target memory is performed. This allows the user to perform initialization steps which might be necessary to enable the access to the target memory. The .gdbinit file also allows to use download into flash memory via J-Link and flash breakpoints.

Protocol extensions

  • SWO support
    GDB Server supports transfer of SWO data (terminal output, instrumentation trace, PC samples, etc.)
  • ETM (processor trace) support: upon request