88 CHAPTER 3 J-Link software and documentation package
J-Link / J-Trace (UM08001) ©
2004-2017 SEGGER Microcontroller GmbH & Co. KG
3.2.2 Command line options
J-Link Commander can be started with different command line options for test and
automation purposes. In the following, the command line options which are available
for J-Link Commander are explained. All command line options are case insensitive.
3.2.2.1 -AutoConnect
This command can be used to let J-Link Commander automatically start the connect
sequence for connecting to the target when entering interactive mode.
Syntax
-autoconnect <1|0>
Example
JLink.exe -autoconnect 1
3.2.2.2 -CommanderScript
Similar to -CommandFile
3.2.2.3 -CommandFile
Selects a command file and starts J-Link Commander in batch mode. The batch mode
of J-Link Commander is similar to the execution of a batch file. The command file is
parsed line by line and one command is executed at a time.
Syntax
-CommandFile <CommandFilePath>
Example
See Using command files on page 91
3.2.2.4 -Device
Pre-selects the device J-Link Commander shall connect to. For some devices, J-Link
already needs to know the device at the time of connecting, since special handling is
required for some of them. For a list of all supported device names, please refer to
http://www.segger.com/jlink_supported_devices.html.
Command Explanation
-AutoConnect Automatically start the target connect sequence
-CommanderScript Passes a CommandFile to J-Link
-CommandFile Passes a CommandFile to J-Link
-Device Pre-selects the device J-Link Commander shall connect to
-ExitOnError Commander exits after error.
-If Pre-selects the target interface
-IP Selects IP as host interface
-JLinkScriptFile Passes a JLinkScriptFile to J-Link
-JTAGConf Sets IRPre and DRPre
-RTTTelnetPort Sets the RTT Telnetport
-SelectEmuBySN Connects to a J-Link with a specific S/N over USB
-SettingsFile Passes a SettingsFile to J-Link
-Speed Starts J-Link Commander with a given initial speed
Table 3.2: Available command line options