1 /** @remote_bitbangpage OpenOCD Developer's Guide
3 The remote_bitbang JTAG+SWD driver is used to drive JTAG and/or SWD from a
4 remote process. The remote_bitbang driver communicates via TCP or UNIX
5 sockets with some remote process using an ASCII encoding of the bitbang
6 interface. The remote process presumably then drives the JTAG/SWD however
7 it pleases. The remote process should act as a server, listening for
8 connections from the openocd remote_bitbang driver.
10 The remote bitbang driver is useful for debugging software running on
11 processors which are being simulated.
13 There also is an implementation of the server-side protocol for the
14 Glasgow Debug Tool (https://github.com/glasgowEmbedded/Glasgow) through
15 the jtag-openocd applet.
17 The bitbang interface consists of the following functions.
20 Blink a light somewhere. The argument on is either 1 or 0.
23 Sample the value of tdo.
26 Set the value of tck, tms, and tdi.
29 Set the value of trst, srst.
32 Set the output enable of the bidirectional swdio (tms) pin
35 Sample the value of swdio (tms).
38 Set the value of swclk (tck) and swdio (tms).
41 Instructs the remote host to sleep/idle for some period of time before
42 executing the next request
44 An additional function, quit, is added to the remote_bitbang interface to
45 indicate there will be no more requests and the connection with the remote
46 driver should be closed.
48 The eight mandatory functions are encoded in ASCII by assigning a single
49 character to each possible request. The assignments are:
69 c - SWDIO read request
75 The read responses are encoded in ASCII as either digit 0 or 1.
77 If the use_remote_sleep option is set to 'yes', two additional requests may
80 Z - Sleep for 1 millisecond
81 z - Sleep for 1 microsecond
83 NOTE: Previously these were specified as 'D' and 'd', which conflicts with the
84 "SWD write 0 0" command defined above. Adapters that implement Dd for remote
85 sleep must be updated to work with Zz.