jtag-probe

CLI reference

glasgow run jtag-probe

Identify, test and debug integrated circuits and board assemblies via IEEE 1149.1 JTAG.

usage: glasgow run jtag-probe [-h] [-V SPEC] [--tck PIN] [--tms PIN]
                              [--tdi PIN] [--tdo PIN] [--trst PIN] [-f FREQ]
                              [--scan-ir-max-length LENGTH]
                              [--scan-dr-max-length LENGTH]
                              [--ir-lengths IR-LENGTH,...]
                              OPERATION ...
-h, --help

show this help message and exit

-V <spec>, --voltage <spec>

configure I/O port voltage to SPEC (e.g.: ‘3.3’, ‘A=5.0,B=3.3’, ‘A=SA’)

--tck <pin>

bind the applet I/O line ‘tck’ to PIN (default: ‘A0’, optional)

--tms <pin>

bind the applet I/O line ‘tms’ to PIN (default: ‘A1’, optional)

--tdi <pin>

bind the applet I/O line ‘tdi’ to PIN (default: ‘A2’, optional)

--tdo <pin>

bind the applet I/O line ‘tdo’ to PIN (default: ‘A3’, optional)

--trst <pin>

bind the applet I/O line ‘trst’ to PIN (optional)

-f <freq>, --frequency <freq>

set TCK frequency to FREQ kHz (default: 100)

--scan-ir-max-length <length>

give up scanning IRs longer than LENGTH bits (default: 128)

--scan-dr-max-length <length>

give up scanning DRs longer than LENGTH bits (default: 1024)

--ir-lengths <ir-length,...>

set IR lengths of each TAP to corresponding IR-LENGTH (default: autodetect)

glasgow run jtag-probe enumerate-ir

THIS COMMAND CAN PERMANENTLY DAMAGE DEVICE UNDER TEST.

IEEE 1149.1 requires every unimplemented IR value to select the BYPASS DR. By selecting every possible IR value and measuring DR lengths, it is possible to discover IR values that definitively correspond to non-BYPASS DRs.

Due to the design of JTAG state machine, measuring DR length requires going through Capture-DR and Update-DR states for instructions that may have IRREVERSIBLE or UNDEFINED behavior. Although this command updates the DR with the data just captured from it, IEEE 1149.1 does not require this operation to be idempotent. Additionally, many devices are not strictly compliant and in practice may perform IRREVERSIBLE or UNDEFINED actions during operations that IEEE 1149.1 requires to be benign, such as selecting an unimplemented instruction, or shifting into DR. USE THIS COMMAND AT YOUR OWN RISK.

DR length measurement can have one of the following four results:
  • DR[n], n > 1: non-BYPASS n-bit DR.

  • DR[1]: (likely) BYPASS or (less likely) non-BYPASS 1-bit DR. This result is not shown because most IR values correspond to DR[1].

  • DR[0]: TDI connected directly to TDO. This is not allowed by IEEE 1149.1, but is very common in practice.

  • DR[?]: (commonly) no connection to TDO or (less commonly) complex logic connected between TDI and TDO that is active during Shift-DR. This is not allowed by IEEE 1149.1, but is common in practice.

usage: glasgow run jtag-probe enumerate-ir [-h] INDEX [INDEX ...]
index

enumerate IR values for TAP(s) #INDEX

-h, --help

show this help message and exit

glasgow run jtag-probe scan

Reset the JTAG TAPs and shift IDCODE or BYPASS register values out to determine the count and (if available) identity of the devices in the scan chain.

usage: glasgow run jtag-probe scan [-h]
-h, --help

show this help message and exit

API reference

Todo

Add API documentation for jtag-probe.