J-Link / J-Trace (UM08001) © 2004-2017 SEGGER Microcontroller GmbH & Co. KG
115
3.3.5 Command line options
There are several command line options available for the GDB Server which allow
configuration of the GDB Server before any connection to a J-Link is attempted or
any connection from a GDB client is accepted.
Note: Using GDB Server CL, device, interface, endian and speed are mandatory
options to correctly connect to the target, and should be given before connection via
GDB. Using GDB Server GUI the mandatory options can also be selected in the con-
figuration dialog.
Note: Using multiple instances of GDB Server, setting custom values for port,
SWOPort and TelnetPort is necessary.
The GDB Server GUI version uses persistent settings which are saved across different
instances and sessions of GDB Server. These settings can be toggled via the check-
boxes in the GUI.
Note: GDB Server CL always starts with the settings marked as default.
For GUI and CL, the settings can be changed with following command line options.
For all persistent settings there is a pair of options to enable or disable the feature.
Command line option Explanation
-device Select the connected target device.
-endian Select the device endianness.
-if Select the interface to connect to the target.
-speed Select the target communication speed.
Table 3.6: Mandatory command line options
Command line option Explanation
-port Select the port to listen for GDB clients.
-swoport Select the port to listen for clients for SWO RAW output.
-telnetport Select the port to listen for clients for printf output.
Table 3.7: Port selection command line options
Command line option Explanation
-ir
-noir
Initialize the CPU registers on start of GDB Server. (Default)
Do not initialize CPU registers on start of GDB Server.
-localhostonly
-nolocalhostonly
Allow only localhost connections (Windows default)
Allow connections from outside localhost (Linux default)
-logtofile
-nologtofile
Generate a GDB Server log file.
Do not generate a GDB Server log file. (Default)
-halt
-nohalt
Halt the target on start of GDB Server.
Do not halt the target on start of GDB Server. (Default)
-silent
-nosilent
Do not show log output.
Show log output. (Default)
-stayontop
-nostayontop
Set the GDB Server GUI to be the topmost window.
Do not be the topmost window. (Default)
-timeout
-notimeout
Set the time after which the target has to be connected.
Set infinite timeout for target connection.
-vd
-novd
Verify after downloading.
Do not verify after downloading. (Default)
Table 3.8: Persistent command line options