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 SPEC] [--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 <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)

--tms <pin>

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

--tdi <pin>

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

--tdo <pin>

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

--trst <pin>

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

--srst <pin>

bind the applet I/O line ‘srst’ to PIN

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

set TCK frequency to FREQ kHz (default: 100)