build: drop space after 'angie' folder name
[openocd.git] / doc / manual / jtag / drivers / remote_bitbang.txt
blob8316cb0dd53a8fcb5ca0d036d4821b751b1b1e87
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.
19 blink on
20         Blink a light somewhere. The argument on is either 1 or 0.
22 read
23         Sample the value of tdo.
25 write tck tms tdi
26         Set the value of tck, tms, and tdi.
28 reset trst srst
29         Set the value of trst, srst.
31 swdio_drive
32         Set the output enable of the bidirectional swdio (tms) pin
34 swdio_read
35         Sample the value of swdio (tms).
37 swd_write
38         Set the value of swclk (tck) and swdio (tms).
40 (optional) sleep
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:
51         B - Blink on
52         b - Blink off
53         R - Read request
54         Q - Quit request
55         0 - Write 0 0 0
56         1 - Write 0 0 1
57         2 - Write 0 1 0
58         3 - Write 0 1 1
59         4 - Write 1 0 0
60         5 - Write 1 0 1
61         6 - Write 1 1 0
62         7 - Write 1 1 1
63         r - Reset 0 0
64         s - Reset 0 1
65         t - Reset 1 0
66         u - Reset 1 1
67         O - SWDIO drive 1
68         o - SWDIO drive 0
69         c - SWDIO read request
70         d - SWD write 0 0
71         e - SWD write 0 1
72         f - SWD write 1 0
73         g - SWD write 1 1
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
78 be sent:
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.
88  */