JTAGLoad

From SEGGER Wiki
Revision as of 14:20, 16 May 2024 by Peter (talk | contribs)
Jump to: navigation, search
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 Connect to J-Link via USB.
-IP address Connects to the Flasher or J-Link via its TCP/IP address
-SelectEmuBySN serial number Connects to a specific flasher or J-Link and uses the serial number to distinguish between them.

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 to use the USB connection to flasher. In case more than one probe is connected, use -SelectEmuBySN to specify the probe.

Syntax

-USB

Example

JTAGLoad.exe -USB

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

Parameter SelectEmuBySN

This parameter specifies the serial number of the probe to connect to. Mostly used together with -USB.

Syntax

-SelectEmuBySN serial number

Example

JTAGLoad.exe -SelectEmuBySN 174402908

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.