To configure the J-Link/J-Trace adapter for Flash download: Choose Flash — Configure Flash Tools. From the menu, to open the Project — Options for Target — Utilities dialog. Warning: Your IP address 207.46.13.235 is public! Your Internet Provider, Government or hackers can very easily track all your activity! Enable protection. J-Flash is a stand-alone flash programming software for PCs running Microsoft Windows. J-Flash has an intuitive user interface and makes programming flash devices convenient. J- Flash requires a J-Link / Flasher, JTAG emulator for ARM cores, to interface to the hardware. ARM’s MDK Version 5.20 software dev kit is split into the MDK Core and Software Packs. Order the Professional, Standard, or Cortex-M edition at Digi-Key! Segger J Flash J link arm keygen.
Sample Results From Member DownloadsDownload Name | Date Added | Speed |
---|---|---|
Segger J Flash HDTV X264 | 12-Dec-2020 | 2,482 KB/s |
Segger J Flash Download | 12-Dec-2020 | 2,746 KB/s |
Segger J Flash KeyGen | 11-Dec-2020 | 2,551 KB/s |
Segger J Flash Password | 10-Dec-2020 | 2,792 KB/s |
Segger.J.Flash.Proper.rar | 04-Dec-2020 | 2,353 KB/s |
Segger J Flash (2020) Retail | 04-Dec-2020 | 2,115 KB/s |
Showing 6 download results of 6 for Segger J Flash |
Take advantage of our limited time offer and gain access to unlimited downloads for FREE! That's how much we trust our unbeatable service. This special offer gives you full member access to our downloads. Take the DownloadKeeper.com tour today for more information and further details!
It's best if you avoid using common keywords when searching for Segger J Flash. Words like: crack, serial, keygen, free, full, version, hacked, torrent, cracked, mp4, etc. Simplifying your search will return more results from the database.
Design and Layout © 2020 DownloadKeeper. All rights reserved.
J-Link Commander (JLink.exe / JLinkExe) is a free, command line based utility that can be used for verifying proper functionality of J-Link as well as for simple analysis of the target system with J-Link. It supports some simple commands, such as memory dump, halt, step, go etc. to verify the target connection. The J-Link Commander is part of the J-Link Software and Documentation Pack, which is available for download on the SEGGER webpage.
The sources of the J-Link Commander are available as part of the J-Link SDK.
- 1Commands
- 1.1Detailed description
- 2Command line options
- 2.1Detailed description
- 10Command specifics
Commands
The table below lists the available commands of J-Link Commander. All commands are listed in alphabetical order within their respective categories.Detailed descriptions of the commands can be found in the sections that follow.
Command (short form) | Explanation |
---|---|
Basic | |
clrBP | Clear breakpoint. |
clrWP | Clear watchpoint. |
connect (con) | Connect to target. |
device | Selects a device. |
erase | Erase internal flash of selected device. |
exec | Execute J-Link Command String. |
exit (qc, q) | Closes J-Link Commander. |
exitonerror (eoe) | Commander exits after error. |
f | Prints firmware info. |
go (g) | Starts the CPU core. |
halt (h) | Halts the CPU core. |
hwinfo | Show hardware info. |
is | Scan chain select register length. |
jtagconf | Configures a JTAG scan chain with multiple devices on it. |
loadfile | Load data file into target memory. |
log | Enables log to file. |
mem | Read memory. |
mem8 | Read 8-bit items. |
mem16 | Read 16-bit items. |
mem32 | Read 32-bit items. |
mem64 | Read 64-bit items. |
mr | Measures reaction time of RTCK pin. |
ms | Measures length of scan chain. |
power | Switch power supply for target. |
r | Resets and halts the target. |
readAP | Reads from a CoreSight AP register. |
readcsr | Reads CSR register on a RISC-V based target. |
readDP | Reads from a CoreSight DP register. |
regs | Shows all current register values. |
rnh | Resets without halting the target. |
rreg | Shows a specific register value. |
rx | Reset target with delay. |
savebin | Saves target memory into binary file. |
setBP | Set breakpoint. |
setPC | Set the PC to specified value. |
SetTimeoutCmd | Set timeout for the stepover command. |
setWP | Set watchpoint. |
si | Select a target interface. |
speed | Set target interface speed. |
st | Shows the current hardware status. |
step (s) | Single step the target chip. |
stepover (so) | Execute a stepover. |
unlock | Unlocks a device. |
verifybin | Compares memory with data file. |
w1 | Write 8-bit items. |
w2 | Write 16-bit items. |
w4 | Write 32-bit items. |
writeAP | Writes to a CoreSight AP register. |
writecsr | Writes CSR register on a RISC-V based target. |
writeDP | Writes to a CoreSight DP register. |
wreg | Write register. |
Flasher I/O | |
fdelete (fdel) | Delete file on emulator. |
flist | List directory on emulator. |
fread (frd) | Read file from emulator. |
fshow | Read and display file from emulator. |
fsize (fsz) | Display size of file on emulator. |
fwrite (fwr) | Write file to emulator. |
Connection to J-Link | |
ip | Connect to J-Link Pro via TCP/IP. |
usb | Connect to J-Link via USB. |
Configuration | |
VCOM | Enable/Disable VCOM |
VTREF | Sets a fixed value for VTref on J-Link. |
WebUSBDisable | Disables WebUSB on J-Link. |
WebUSBEnable | Enables WebUSB on J-Link. |
Detailed description
Following is a detailed description with syntax explaination and examples of the commands listed above.
clrBP
This command removes a breakpoint set by J-Link.
Syntax
Parameter | Meaning |
---|---|
BP_Handle | Handle of breakpoint to be removed. |
Example
clrWP
This command removes a watchpoint set by J-Link.
Syntax
Parameter | Meaning |
---|---|
WP_Handle | Handle of watchpoint to be removed. |
Example
connect
This command establishes a connection between J-Link and target.
Note
If not set already, this command will prompt the user for settings which are needed in order to connect to the target.
Syntax
device
Selects a specific device J-Link shall connect to and performs a reconnect.In most cases explicit selection of the device is not necessary.Selecting a device enables the user to make use of the J-Link flash programming functionality as well as using unlimited breakpoints in flash memory.For some devices explicit device selection is mandatory in order to allow the DLL to perform special handling needed by the device.Some commands require that a device is set prior to use them.
Syntax
Parameter | Meaning |
---|---|
DeviceName | Valid device name: Device is selected. ?: Shows a device selection dialog. |
Example
erase
Erases all flash sectors or a certain flash range of the current device. A device has to be specified previously.When specified, all flash between the <StartAddr> and <EndAddr> will be erased.
Syntax
exec
Execute J-Link Command String. For more information about the usage of J-Link Command Strings please refer to J-Link Command Strings.
Syntax
Parameter | Meaning |
---|---|
Command | J-Link Command String to be executed. |
Example
exit
This command closes the target connection, the connection to the J-Link and exits J-Link Commander.
Syntax
exitonerror
This command toggles whether J-Link Commander exits on error or not.
Syntax
Parameter | Meaning |
---|---|
1/0 | 1: J-Link Commander will now exit on Error. 0: J-Link Commander will no longer exit on Error. |
Example
f
Prints firmware and hardware version info. Please notice that minor hardware revisions may not be displayed, as they do not have any effect on the feature set.
Syntax
fdelete
On emulators which support file I/O this command deletes a specific file.
Syntax
Parameter | Meaning |
---|---|
FileName | File to delete from the Flasher. |
J-flash Keygen
Example
flist
On emulators which support file I/O this command shows the directory tree of the Flasher.
Syntax
fread
On emulators which support file I/O this command reads a specific file.Offset applies to both destination and source file.
Syntax
Parameter | Meaning |
---|---|
EmuFile | File name to read from. |
HostFile | Destination file on the host. |
Offset | Specifies the offset in the file, at which data reading is started. |
NumBytes | Maximum number of bytes to read. |
Example
fshow
On emulators which support file I/O this command reads and prints a specific file.Currently, only Flasher models support file I/O.
Syntax
Parameter | Meaning |
---|---|
FileName | Source file name to read from the Flasher. |
a | If set, Input will be parsed as text instead of being shown as hex. |
Offset | Specifies the offset in the file, at which data reading is started. |
NumBytes | Maximum number of bytes to read. |
Example
fsize
On emulators which support file I/O this command gets the size of a specific file.Currently, only Flasher models support file I/O.
Syntax
Parameter | Meaning |
---|---|
FileName | Source file name to read from the Flasher. |
Example
fwrite
On emulators which support file I/O this command writes a specific file.Currently, only Flasher models support file I/O. NumBytes is limited to 512 bytes at once.This means, if you want to write e.g. 1024 bytes, you have to send the command twice,using an appropriate offset when sending it the second time. Offset applies to both destination and source file.
Syntax
Parameter | Meaning |
---|---|
EmuFile | File name to write to. |
HostFile | Source file on the host |
Offset | Specifies the offset in the file, at which data writing is started. |
NumBytes | Maximum number of bytes to write. |
Example
go
Starts the CPU. In order to avoid setting breakpoints it allows to define a maximum number of instructions which can be simulated/emulated.This is particularly useful when the program is located in flash and flash breakpoints are used. Simulating instructions avoids to reprogram the flash and speeds up (single) stepping.
Syntax
Parameter | Meaning |
---|---|
NumSteps | Maximum number of instructions allowed to be simulated. Instruction simulation stops whenever a breakpointed instruction is hit, an instruction which cannot be simulated/emulated is hit or when NumSteps is reached. |
Flags | 0: Do not start the CPU if a BP is in range of NumSteps 1: Overstep BPs |
Example
halt
Halts the CPU Core. If successful, shows the current CPU registers.
Syntax
hwinfo
This command can be used to get information about the power consumption of the target (if the target is powered via J-Link). It also gives the information if an overcurrent happened.
Syntax
ip
Closes any existing connection to J-Link and opens a new one via TCP/IP. If no IP Address is specified, the Emulator selection dialog shows up.
Syntax
Parameter | Meaning |
---|---|
Addr | Valid values: IP Address: Connects the J-Link with the specified IP-Address Host Name: Resolves the host name and connects to it. *: Invokes the Emulator selection dialog. |
Example
is
This command returns information about the length of the scan chain select register.
Syntax
jtagconf
Configures a JTAG scan chain with multiple devices on it.
For more detailed information on how to configure a scan chain with multiple devices please refer to Determining values for scan chain configuration.
Syntax
Parameter | Meaning |
---|---|
IRPre | Sum of IRLens of all devices closer to TDI, where IRLen is the number of bits in the IR (Instruction Register) of one device. |
DRPre | Number of devices closer to TDI. |
Example
loadfile
This command programs a given data file to a specified destination address. Currently supported data files are:
- *.mot
- *.srec
- *.s19
- *.s
- *.hex
- *.bin
Syntax
Parameter | Meaning |
---|---|
Filename | Source filename |
Addr | Destination address. If not passed, 0x0 is assumed. Only used for .bin files. Ignored for other formats. |
Example
log
Syntax
Parameter | Meaning |
---|---|
Filename | Log filename |
Example
mem
The command reads memory from the target system. If necessary, the target CPU is halted in order to read memory. Zone names will be displayed on first connect to target with J-Link commander if available.
Syntax
Parameter | Meaning |
---|---|
Zone | Name of memory zone to access. |
Addr | Start address. |
Numbytes | Number of bytes to read. Maximum is 0x100000. |
Example
or
mem8
The command reads memory from the target system in units of bytes. If necessary, the target CPU is halted in order to read memory.
Syntax
Parameter | Meaning |
---|---|
Zone | Name of memory zone to access. |
Addr | Start address. |
Numbytes | Number of bytes to read. Maximum is 0x100000. |
Example
mem16
The command reads memory from the target system in units of 16-bits. If necessary, the target CPU is halted in order to read memory.
Syntax
Parameter | Meaning |
---|---|
Zone | Name of memory zone to access. |
Addr | Start address. |
NumItems | Number of halfwords to read. Maximum is 0x80000. |
Example
mem32
The command reads memory from the target system in units of 32-bits. If necessary, the target CPU is halted in order to read memory.
Syntax
Parameter | Meaning |
---|---|
Zone | Name of memory zone to access. |
Addr | Start address. |
NumItems | Number of words to read. Maximum is 0x40000. |
Example
mem64
The command reads memory from the target system in units of 64-bits. If necessary, the target CPU is halted in order to read memory.
Syntax
Parameter | Meaning |
---|---|
Zone | Name of memory zone to access. |
Addr | Start address. |
NumItems | Number ofdouble words to read. Maximum is 0x20000. |
Example
mr
Measure reaction time of RTCK pin.
Syntax
Parameter | Meaning |
---|---|
RepCount | Number of times the test is repeated (Default: 1). |
Example
ms
Measures the number of bits in the specified scan chain.
Syntax
Parameter | Meaning |
---|---|
ScanChain | Scan chain to be measured. |
Example
power
This command sets the status of the power supply over pin 19 of the JTAG connector. The KS(Kickstart) versions of J-Link have the 5V supply over pin 19 activated by default. This feature is useful for some targets that can be powered over the JTAG connector.
Syntax:
Parameter | Meaning |
---|---|
State | Valid values: On, Off |
perm | Sets the specified State value as default. |
Example
r
Resets and halts the target.
Syntax
readAP
Reads from a CoreSight AP register. This command performs a full-qualified read which means that it tries to read until the read has been accepted or too many WAIT responses have been received. In case actual read data is returned on the next read request (this is the case for example with interface JTAG) this command performs the additional dummy read request automatically.
Syntax
Parameter | Meaning |
---|---|
RegIndex | Index of AP register to read |
Example
readcsr
Reads a specific CSR (Control Status Register) on a RISC-V based target.
Syntax
Parameter | Meaning |
---|---|
RegIndex | Index of CSR register to read |
RegSizeBytes | Optional. Specifies length of CSR register in bytes. If omitted RegSize is assumed to be XLEN (32-bit on RV32, 64-bit on RV64). |
Example
readDP
Reads from a CoreSight DP register. This command performs a full-qualified read which means that it tries to read until the read has been accepted or too many WAIT responses have been received. In case actual read data is returned on the next read request (this is the case for example with interface JTAG) this command performs the additional dummy read request automatically.
J-flash Keygen
Syntax
Parameter | Meaning |
---|---|
RegIndex | Index of DP register to read |
Example
regs
Shows all current register values.
Syntax
rnh
This command performs a reset but without halting the device.
Syntax
rreg
The function prints the value of the specified CPU register.
Syntax
Parameter | Meaning |
---|---|
RegIndex | Register to read. |
Example
rx
Resets and halts the target. It is possible to define a delay in milliseconds after reset. This function is useful for some target devices which already contain an application or a boot loader and therefore need some time before the core is stopped, for example to initialize hardware, the memory management unit (MMU) or the external bus interface.
Syntax
Parameter | Meaning |
---|---|
DelayAfterReset | Delay in ms. |
Example
savebin
Saves target memory into binary file.
Syntax
Parameter | Meaning |
---|---|
Filename | Destination file |
Addr | Source address. |
NumBytes | Number of bytes to read. |
Example
setBP
This command sets a breakpoint of a specific type at a specified address. Which breakpoint modes are available depends on the CPU that is used.
Syntax
Parameter | Meaning |
---|---|
Addr | Address to be breakpointed. |
A/T | Only for ARM7/9/11 and Cortex-R4 devices: A: ARM mode T: THUMB mode |
W/H | Only for MIPS devices: W: MIPS32 mode (Word) H: MIPS16 mode (Half-word) |
S/H | S: Force software BP H: Force hardware BP |
Example
setPC
Sets the PC to the specified value.
Syntax
Parameter | Meaning |
---|---|
Addr | Address the PC should be set to. |
Example
SetTimeoutCmd
Set timeout in milliseconds for a specific command.
Note
Right now only stepover is supported
Syntax
Parameter | Meaning |
---|---|
Cmd | Command to set timeout for. |
TimeoutMs | Timeout in milliseconds. |
Example
setWP
This command inserts a new watchpoint that matches the specified parameters.The enable bit for the watchpoint as well as the data access bit of the watchpoint unit are set automatically by this command.Moreover the bits DBGEXT, CHAIN and the RANGE bit (used to connect one watchpoint with the other one) are automatically masked out.In order to use these bits you have to set the watchpoint by writing the ICE registers directly.
Syntax
Parameter | Meaning |
---|---|
Addr | Address to be watchpointed. |
Accesstype | Specifies the control data on which data event has been set: R: read access W: write access |
Size | Valid values: S8 | S16 | S32 Specifies to monitor an n-bit access width at the selected address. |
Data | Specifies the Data on which watchpoint has been set. |
DataMask | Specifies data mask used for comparison. Bits set to 1 are masked out, so not taken into consideration during data comparison. Please note that for certain cores not all Bit-Mask combinations are supported by the core-debug logic. On some cores only complete bytes can be masked out (e.g. PIC32) or similar. |
AddrMask | Specifies the address mask used for comparison. Bits set to 1 are masked out, so not taken into consideration during address comparison. Please note that for certain cores not all Bit-Mask combinations are supported by the core-debug logic. On some cores only complete bytes can be masked out (e.g. PIC32) or similar. |
Example
si
This command selects a target interface.
Syntax
Parameter | Meaning |
---|---|
Interface | Can be any supported target interface (e.g SWD, JTAG, ICSP, FINE, ...) |
Example
sleep
Waits the given time (in milliseconds).
Syntax
Parameter | Meaning |
---|---|
Delay | Amount of time to sleep in ms. |
Example
st
This command prints the current hardware status. Prints the current status of TCK, TDI, TDO, TMS, TRES, TRST and the interface speeds supported by the target. Also shows the Target Voltage.
Syntax
step
Target needs to be halted before calling this command.Executes a single step on the target.The instruction is overstepped even if it is breakpointed. Prints out the disassembly of the instruction to be stepped.
Syntax
stepover
Target needs to be halted before calling this command.Executes a stepover on the target, similar how a debugger does it. The instruction is overstepped even if it is breakpointed.Prints out the disassembly of the instruction to be stepped over. By default this command has a timeout of five seconds.
Note
For more information see SetTimeoutCmd
Syntax
unlock
This command unlocks a device which has been accidentally locked by malfunction of user software.
Syntax
Parameter | Meaning |
---|---|
DeviceName | Name of the device family to unlock. Supported Devices: LM3Sxxx Kinetis EFM32Gxxx |
Example
usb
Closes any existing connection to J-Link and opens a new one via USB. It is possible to select a specific J-Link by port number.
Syntax
Parameter | Meaning |
---|---|
Port | Valid values: 0..3 |
Example
verifybin
Verifies if the specified binary is already in the target memory at the specified address.
Syntax
Parameter | Meaning |
---|---|
Filename | Sample bin. |
Addr | Start address of memory to verify. |
Example
VCOM
Enables or disables the VCOM of the J-Link (if the probe supports VCOM).
After changing the configuration a power cycle of the debug probe is necessary in order for the new configuration to take effect.
Syntax
Parameter | Meaning |
---|---|
Configuration | Can be either enable or disable |
Example
VTREF
Sets a fixed value for VTref on J-Link.The Value of VTref can be set between 1200 mV and 3300 mV all values that exceed 3300 mV will be limited to 3300 mV, values smaller than 1200 mV deactivate fixed VTref.Settings of fixed VTref apply nonvolatile after power cycling the probe.
Syntax
Parameter | Meaning |
---|---|
ValuemV | value in Millivolt |
Example
Note
The command overrides the VTref pin and once set the pin will be ignored. To activate the pin again call the VTREF command with a voltage of 0V.
w1
The command writes one single byte to the target system.
Syntax
Parameter | Meaning |
---|---|
Zone | Name of memory zone to access. |
Addr | Start address. |
Data | 8-bits of data to write. |
Example
w2
The command writes a unit of 16-bits to the target system.
Syntax
Parameter | Meaning |
---|---|
Zone | Name of memory zone to access. |
Addr | Start address. |
Data | 16-bits of data to write. |
Example
w4
The command writes a unit of 32-bits to the target system.
Syntax
Parameter | Meaning |
---|---|
Zone | Name of memory zone to access. |
Addr | Start address. |
Data | 32-bits of data to write. |
Example
WebUSBDisable
Disables WebUSB on J-Link. The WebUSB configuration applies nonvolatile after power cycling the probe.
Syntax
WebUSBEnable
Enables WebUSB on J-Link. The WebUSB configuration applies nonvolatile after power cycling the probe.
Syntax
writeAP
Writes to a CoreSight AP register. This command performs a full-qualified write which means that it tries to write until the write has been accepted or too many WAIT responses have been received.
Syntax
Parameter | Meaning |
---|---|
RegIndex | Index of AP register to write |
Data32Hex | Data to write |
Example
writecsr
Writes a specific CSR (Control Status Register) on a RISC-V based target.
Note
Writes to known CSRs (like X1) may not be written to HW directly but with the next g or s command.
Syntax
Parameter | Meaning |
---|---|
RegIndex | Index of CSR register to write |
Data | Data to write |
RegSizeBytes | Optional. Specifies length of CSR register in bytes. If omitted RegSize is assumed to be XLEN (32-bit on RV32, 64-bit on RV64). |
Example
writeDP
Writes to a CoreSight DP register.This command performs a full-qualified write which means that it tries to write until the write has been accepted or too many WAIT responses have been received.
Syntax
Parameter | Meaning |
---|---|
RegIndex | Index of DP register to write |
Data32Hex | Data to write |
Example
wreg
Writes into a register. The value is written into the register on CPU start.
Syntax
Parameter | Meaning |
---|---|
RegName | Register to write to. |
Data | Data to write to the specified register. |
Example
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.
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 |
-Log | Sets logfile path |
-NoGui | Starts J-Link Commander in no GUI mode |
-RTTTelnetPort | Sets the RTT Telnetport |
-USB | 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 |
Detailed description
Following is a detailed description with syntax and examples of the command lines listed above.
-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
Example
-CommanderScript
Similar to -CommandFile.
-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
Example
See Using J-Link Command FIles.
-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 List of supported target devices.
Syntax
Example
Additional information
Selecting 'default' as <DeviceName> will select the last known connected device.
-ExitOnError
Similar to the exitonerror command.
-If
Selects the target interface J-Link shall use to connect to the target.By default, J-Link Commander first tries to connect to the target using the target interface which is currently selected in the J-Link firmware.If connecting fails, J-Link Commander goes through all target interfaces supported by the connected J-Link and tries to connect to the device.
Syntax
Example
-IP
Selects IP as host interface to connect to J-Link. Default host interface is USB.
Syntax
Example
Additional information
-JLinkScriptFile
Passes the path of a J-Link script file to the J-Link Commander.J-Link scriptfiles are mainly used to connect to targets which need a special connection sequence before communication with the core is possible.For more information about J-Link script files, please refer to J-Link Script Files.
Syntax
Example
-JTAGConf
Passes IRPre and DRPre in order to select a specific device in a JTAG-chain. “-1,-1” can be used to let J-Link select a device automatically.
Syntax
Example
-Log
Set path to LogFilePath allowing the DLL to output logging information.If the logfile already exists, the contents of the current logfile will be overwritten.
Syntax
Example
-NoGui
Starts the J-Link Commander in 'no GUI'-mode.Please note that license dialogs are not suppressed in this mode.
Syntax
Example
NOTE:This command is not yet available. It will be available for Version 6.71d (beta) and V6.74 (release) or later, of the Software and Documentation Pack.
-RTTTelnetPort
This command alters the RTT telnet port. Default is 19021.
Syntax
Example
-USB
Connect to a J-Link with a specific serial number via USB.Useful if multiple J-Links are connected to the same PC and multiple instances of J-Link Commander shall run and each connects to another J-Link.
Syntax
Example
-SettingsFile
Select a J-Link settings file to be used for the target device.The settings file can contain all configurable options of the Settings tab in J-Link Control panel.
Syntax
Example
-Speed
Starts J-Link Commander with a given initial speed. Available parameters are “adaptive”, “auto” or a freely selectable integer value in kHz.It is recommended to use either a fixed speed or, if it is available on the target, adaptive speeds.Default interface speed is 100kHz.
Syntax
Example
Using J-Link Command Files
J-Link commander can also be used in batch mode which allows the user to use J-Link commander for batch processing and without user interaction.Please do not confuse J-Link Command Files file with J-Link Script Files.When using J-Link commander in batch mode, the path to a command file is passed to it.The syntax in the command file is the same as when using regular commands in J-Link commander (one line per command).SEGGER recommends to always pass the device name via command line option due some devices need special handling on connect/reset in order to guarantee proper function.
Example
Contents of CommandFile.jlink:
Perform flash download
J-Link Commander allows to download data files of different types into the flash memory of the target systems.
- Connect J-Link to the PC
- Connect target system to J-Link
- Start J-Link Commander
- Enter the requested settings (e.g. target device, interface settings, etc...)
- Type the following commands:
- r
- loadfile <PathToFile> [<DestAddr>]
- J-Link Commander executes the flash download and prints out the time statistics on success.
Batch processing
Basically, some target configuration settings needs to be specified in J-Link Commander before a target connection can be established. However, the J-Link Commander comes with multiple command line options as well as a so called J-Link Commander Command Script mode, which allows using J-Link Commander in batch processing mode, so that it can be used fully automatic.
The table below describes the different command line arguments, which can be used to run the commander, without the need to input any configuration / commands:
Command line option | Explanation |
---|---|
-device <DeviceName> | Selects the target device. |
-if <TargetInterface> | Configures the target interface. |
-speed <InterfaceSpeed> | Configures the target interface speed. |
-jtagconf <IRPre,DRPre> | Configures the JTAG scan configuration of the target device. IRPre-1 and DRPre-1 can be passed to use auto-detection (First known device will be used). |
-autoconnect <Value> | Value1: Forces the J-Link Commander to connect to the target, automatically. |
-CommanderScript <ScriptPath> | Selects a J-Link Commander Command file which contains the commands for the batch mode. |
-SelectEmuBySN <SerialNo> | Selects a specific J-Link (via its serial number) to connect to. Used in case multiple J-Links are connected to the same PC via USB. |
Example:
JLink.exe return value
The return value of the J-Link Commander application (JLink.exe) can be read out int the environment variable ERRORLEVEL.
Examples:
1. Returns an Error (ERRORLEVEL 1)
2. Returns no Error (ERRORLEVEL 0)
For information how to access the environment variable ERRORLEVEL within a java application please refer to:http://stackoverflow.com/questions/8922485/how-to-execute-echo-errorlevel-in-java
For further information regarding this, please refer to:http://blogs.msdn.com/b/oldnewthing/archive/2008/09/26/8965755.aspx
Using J-Link Command Strings
In order to use J-Link Command Strings in J-Link Commander, the native J-Link Commander command exec supplemented by one of the available J-Link Command Strings can be used.
Example:
Connecting to a specific J-Link
It is possible to have multiple J-Links connected to the PC at the same time (for more information, see here. To connect to a specific J-Link in an automated way (no user interaction required), J-Link Commander needs to be told the S/N of the J-Link to connect to. This can be done via two different methods:
- Specify the S/N directly via command line. See -SelectEmuBySN above for more information.
- Specify 'SelectEmuBySN <SN>' (without quotes) as first command in the J-Link command file that is passed to J-Link Commander via command line
Setup External CFI NOR Flash
J-Link Commander supports downloading bin files into external CFI flash memory. In the following, it is explained which steps are necessary to prepare J-Link Commander for download into external CFI flash memory based on a sample sequence for a ST STM32F103ZE device:
Command specifics
Verifybin command
The verifybin command in J-Link Commander executes a simple read of memory and compares the data against the data in the specified bin file. Note that *no* initialization of any flash interface etc. is done on this command. For external QSPI flash for example this means that the pins and the QSPI controller of the target MCU have to be already initialized etc. for this command to succeed. This is different for 'loadbin' which may trigger a flash download implicitly where a flash loader is started that takes care of the initialization.Also note that executing a 'loadbin' command in advance, does not guarantee that a 'verifybin' succeeds because the loadbin commands restores the controller state after it is done. So if the QSPI controller and/or pins were not initialized before the 'loadbin' command, they are not after it either. They are only available while 'loadbin' is active.