JTAGLoad: Difference between revisions

From SEGGER Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[File:JTAGLoad.png | thumb | 400px | right | J-Link RTT Viewer]]
[[File:JTAGLoad.png | thumb | 400px | right | J-Link RTT Viewer]]
JTAGLoad is a supplementary, command line tool (JTAGLoad.exe) that is used to play [[wikipedia:Serial_Vector_Format|SVF (Serial vector format)]] files.  
JTAGLoad is a supplementary, command line tool (JTAGLoad.exe) that is used to play [[wikipedia:Serial_Vector_Format|SVF (Serial vector format)]] files.


It opens and plays a [[wikipedia:Serial_Vector_Format|SVF]] file for JTAG boundary scan tests. SVF files contain sequences of instructions that describe a sequence of states of the JTAG TAP state machine to be run through.  
It opens and plays a [[wikipedia:Serial_Vector_Format|SVF]] file for JTAG boundary scan tests. SVF files contain sequences of instructions that describe a sequence of states of the JTAG TAP state machine to be run through.
The data in the file will be sent to the target via J-Link / J-Trace or Flasher, respectively.
The data in the file will be sent to the target via J-Link / J-Trace or Flasher, respectively.


Line 13: Line 13:
</div>
</div>


= Installation =
== Installation ==
JTAGLoad is available as part of the [[J-Link Software and Documentation Pack]], which can be downloaded from the [https://www.segger.com/downloads/jlink#J-LinkSoftwareAndDocumentationPack SEGGER Homepage]and also part of the ''Flasher Software and Documentation Pack'', which you can download here: [https://www.segger.com/downloads/flasher/#Flasher Flasher Software And Documentation Pack].  
JTAGLoad is available as part of the [[J-Link Software and Documentation Pack]], which can be downloaded from the [https://www.segger.com/downloads/jlink#J-LinkSoftwareAndDocumentationPack SEGGER Homepage]and also part of the [[UM08022_Flasher#Flasher_Software_and_Documentation_Pack|Flasher Software and Documentation Pack]], which you can download here: [https://www.segger.com/downloads/flasher/#Flasher Flasher Software And Documentation Pack].


It is installed with the respective package.
It is installed with the respective package.


= Operation =
== Operation ==
JTAGLoad.exe is called via the command line. Certain parameters can be specified during the call. Some values are queried interactively if they are missing or ambiguous.  
JTAGLoad.exe is called via the command line. Certain parameters can be specified during the call. Some values are queried interactively if they are missing or ambiguous.
== Command line arguments ==
=== Command line arguments ===
[[File:JTAGLoad-Help.png| thumb | 400px | right | JTAGLoad.exe command line parameters]]
[[File:JTAGLoad-Help.png| thumb | 400px | right | JTAGLoad.exe command line parameters]]
{|class="wikitable"
{|class="wikitable"
|+ JTAGLoad command line arguments
|+ JTAGLoad command line arguments
|-  
|-
! argument !! description
! argument !! description
|-
|-
Line 33: Line 33:
| -[[#Parameter_LogFile|LogFile]] ''path/to/log/file'' || Sets the log file path to <Path>.
| -[[#Parameter_LogFile|LogFile]] ''path/to/log/file'' || Sets the log file path to <Path>.
|-
|-
| -[[#Parameter_USB|USB]] || Connect to J-Link via USB.
| -[[#Parameter_USB|USB]] ''serial number'' || Connect to J-Link via USB. The serial number of the J-Link has to be specified.
|-
|-
| -[[#Parameter_IP|IP]] ''address'' || Connects to the Flasher or J-Link via its TCP/IP address
| -[[#Parameter_IP|IP]] ''address'' || Connects to the Flasher or J-Link via its TCP/IP address
|-
| -[[#Parameter_SelectEmuBySN|SelectEmuBySN]] ''serial number'' || Connects to a specific flasher or J-Link and uses the serial number to distinguish between them.
|}
|}


=== Parameter <code>?</code> ===
==== Parameter <code>?</code> ====
Shows a short help about usage and available commands.
Shows a short help about usage and available commands.
==== Syntax ====
===== Syntax =====
  -?
  -?
==== Example ====
===== Example =====
  JTAGLoad.exe -?
  JTAGLoad.exe -?


=== Parameter <code>NoAutoExit</code> ===
==== Parameter <code>NoAutoExit</code> ====
If this parameter is used, JTAGLoad is not terminated after the process has been completed.
If this parameter is used, JTAGLoad is not terminated after the process has been completed.
==== Syntax ====
===== Syntax =====
  -NoAutoExit
  -NoAutoExit
==== Example ====
===== Example =====
  JTAGLoad.exe -NoAutoExit
  JTAGLoad.exe -NoAutoExit


=== Parameter <code>LogFile</code> ===
==== Parameter <code>LogFile</code> ====
This parameter specifies the name and path of the log file to which the output is to be written. It is usually used if the call is made automatically by a test program.
This parameter specifies the name and path of the log file to which the output is to be written. It is usually used if the call is made automatically by a test program.
==== Syntax ====
===== Syntax =====
  -LogFile ''path/to/log/file''
  -LogFile ''path/to/log/file''
==== Example ====
===== Example =====
  JTAGLoad.exe -LogFile c:\temp\jtagload.log
  JTAGLoad.exe -LogFile c:\temp\jtagload.log


=== Parameter <code>USB</code> ===
==== Parameter <code>USB</code> ====
This parameter to use the USB connection to flasher. In case more than one probe is connected, use [[#Parameter_SelectEmuBySN|-SelectEmuBySN]] to specify the probe.
This parameter can be used to connect to a specific J-Link or Flasher. Can also be omitted if only one device is connected via USB.
==== Syntax ====
===== Syntax =====
  -USB
  -USB ''serial number''
==== Example ====
===== Example =====
  JTAGLoad.exe -USB
  JTAGLoad.exe -USB 600100000


=== Parameter <code>IP</code> ===
==== Parameter <code>IP</code> ====
This parameter specifies the IP address of the probe and also forces JTAGLoad to connection to probe via TCP/IP.
This parameter specifies the IP address of the probe and also forces JTAGLoad to connection to probe via TCP/IP.
==== Syntax ====
===== Syntax =====
  -IP ''ip address''
  -IP ''ip address''
==== Example ====
===== Example =====
  JTAGLoad.exe -IP 192.168.0.211
  JTAGLoad.exe -IP 192.168.0.211


=== Parameter <code>SelectEmuBySN</code> ===
== SVF commands supported by JTAGLoad ==
This parameter specifies the serial number of the probe to connect to. Mostly used together with [[#Parameter_USB|-USB]].
==== Syntax ====
-SelectEmuBySN ''serial number''
==== Example ====
JTAGLoad.exe -SelectEmuBySN 174402908
 
= SVF commands supported by JTAGLoad =
* ENDDR
* ENDDR
* ENDIR
* ENDIR
Line 95: Line 86:
* TIR
* TIR


= SVF (Serial Vector Format) =
== SVF (Serial Vector Format) ==
SVF is a standard format for boundary scan vectors to be used with different tools and targets.
SVF is a standard format for boundary scan vectors to be used with different tools and targets.
SVF files contain human-readable ASCII SVF statements consisting of an SVF command, the data to be sent, the expected response, a mask for the response or additional information.
SVF files contain human-readable ASCII SVF statements consisting of an SVF command, the data to be sent, the expected response, a mask for the response or additional information.


== Example ==
=== Example ===
A simple SVF file to read the JTAG ID of the target can look like the following.
A simple SVF file to read the JTAG ID of the target can look like the following.
  ! Set JTAG frequency
  ! Set JTAG frequency

Latest revision as of 14:42, 11 March 2025

J-Link RTT Viewer

JTAGLoad is a supplementary, command line tool (JTAGLoad.exe) that is used to play SVF (Serial vector format) files.

It opens and plays a SVF file for JTAG boundary scan tests. SVF files contain sequences of instructions that describe a sequence of states of the JTAG TAP state machine to be run through. The data in the file will be sent to the target via J-Link / J-Trace or Flasher, respectively.

This can be used to load a bitstream into an FPGA or configuration flash.


Installation

JTAGLoad is available as part of the J-Link Software and Documentation Pack, which can be downloaded from the SEGGER Homepageand also part of the Flasher Software and Documentation Pack, which you can download here: Flasher Software And Documentation Pack.

It is installed with the respective package.

Operation

JTAGLoad.exe is called via the command line. Certain parameters can be specified during the call. Some values are queried interactively if they are missing or ambiguous.

Command line arguments

JTAGLoad.exe command line parameters
JTAGLoad command line arguments
argument description
-? Shows usage and available commands.
-NoAutoExit Prevents auto exiting.
-LogFile path/to/log/file Sets the log file path to <Path>.
-USB serial number Connect to J-Link via USB. The serial number of the J-Link has to be specified.
-IP address Connects to the Flasher or J-Link via its TCP/IP address

Parameter ?

Shows a short help about usage and available commands.

Syntax
-?
Example
JTAGLoad.exe -?

Parameter NoAutoExit

If this parameter is used, JTAGLoad is not terminated after the process has been completed.

Syntax
-NoAutoExit
Example
JTAGLoad.exe -NoAutoExit

Parameter LogFile

This parameter specifies the name and path of the log file to which the output is to be written. It is usually used if the call is made automatically by a test program.

Syntax
-LogFile path/to/log/file
Example
JTAGLoad.exe -LogFile c:\temp\jtagload.log

Parameter USB

This parameter can be used to connect to a specific J-Link or Flasher. Can also be omitted if only one device is connected via USB.

Syntax
-USB serial number
Example
JTAGLoad.exe -USB 600100000

Parameter IP

This parameter specifies the IP address of the probe and also forces JTAGLoad to connection to probe via TCP/IP.

Syntax
-IP ip address
Example
JTAGLoad.exe -IP 192.168.0.211

SVF commands supported by JTAGLoad

  • ENDDR
  • ENDIR
  • FREQUENCY
  • HDR
  • HIR
  • RUNTEST
  • SDR
  • SIR
  • STATE
  • TDR
  • TIR

SVF (Serial Vector Format)

SVF is a standard format for boundary scan vectors to be used with different tools and targets. SVF files contain human-readable ASCII SVF statements consisting of an SVF command, the data to be sent, the expected response, a mask for the response or additional information.

Example

A simple SVF file to read the JTAG ID of the target can look like the following.

! Set JTAG frequency
FREQUENCY 12000000HZ;
! Configure scan chain
! For a single device in chain, header and trailer data on DR and IR are 0
! Set TAP to IDLE state
STATE IDLE;
! Configure end state of DR and IR after scan operations
ENDDR IDLE;
ENDIR IDLE;
! Start of test
! 32 bit scan on DR, In: 32 0 bits, Expected out: Device ID (0x0BA00477)
SDR 32 TDI (0) TDO (0BA00477) MASK (0FFFFFFF);
! Set TAP to IDLE state
STATE IDLE;
! End of test

Note: SVF files allow even more complex tasks, basically everything which is possible via JTAG and the devices in the scan chain, like configuring an FPGA or loading data into memory.