jtag-openocd

glasgow run jtag-openocd

Expose JTAG via a socket using the OpenOCD remote bitbang protocol.

Usage with TCP sockets:

glasgow run jtag-openocd tcp:localhost:2222
openocd -c 'adapter driver remote_bitbang; transport select jtag' \
    -c 'remote_bitbang port 2222' \
    -c 'reset_config none'

Usage with Unix domain sockets:

glasgow run jtag-openocd unix:/tmp/jtag.sock
openocd -c 'adapter driver remote_bitbang; transport select jtag' \
    -c 'remote_bitbang host /tmp/jtag.sock' \
    -c 'reset_config none'

If you use TRST# and/or SRST# pins, the ‘reset_config none’ option above must be replaced with ‘reset_config trst’, ‘reset_config srst’, or ‘reset_config trst_and_srst’.

usage: glasgow run jtag-openocd [-h] [-V VOLTS] [--tck PIN] [--tms PIN]
                                [--tdi PIN] [--tdo PIN] [--trst PIN]
                                [--srst PIN] [-f FREQ]
                                ENDPOINT
endpoint

listen at ENDPOINT, either unix:PATH or tcp:HOST:PORT

-h, --help

show this help message and exit

-V <volts>, --voltage <volts>

target power (voltage reference of the interface) (range: 1.8..5 V, or ‘S<port>’ to follow the voltage sensed on a port; default: unchanged)

--tck <pin>

bind test clock to PIN (default: ‘A0’, required)

--tms <pin>

bind test mode select to PIN (default: ‘A1’, required)

--tdi <pin>

bind test data in to PIN (default: ‘A2’, required)

--tdo <pin>

bind test data out to PIN (default: ‘A3’, required)

--trst <pin>

bind test reset (active low) to PIN (optional)

--srst <pin>

bind system reset (active low) to PIN (optional)

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

set TCK frequency to FREQ kHz (default: 100)