arm_adi_v5: fix regression from 4553abf9064fe3c0e4ea2ed29a1d2217df74ff5f
[openocd.git] / README
1 Welcome to OpenOCD!
2 ===================
3
4 OpenOCD provides on-chip programming and debugging support with a
5 layered architecture of JTAG interface and TAP support including:
6
7 - (X)SVF playback to facilitate automated boundary scan and FPGA/CPLD
8 programming;
9 - debug target support (e.g. ARM, MIPS): single-stepping,
10 breakpoints/watchpoints, gprof profiling, etc;
11 - flash chip drivers (e.g. CFI, NAND, internal flash);
12 - embedded TCL interpreter for easy scripting.
13
14 Several network interfaces are available for interacting with OpenOCD:
15 telnet, TCL, and GDB. The GDB server enables OpenOCD to function as a
16 "remote target" for source-level debugging of embedded systems using
17 the GNU GDB program (and the others who talk GDB protocol, e.g. IDA
18 Pro).
19
20 This README file contains an overview of the following topics:
21
22 - quickstart instructions,
23 - how to find and build more OpenOCD documentation,
24 - list of the supported hardware,
25 - the installation and build process,
26 - packaging tips.
27
28
29 ============================
30 Quickstart for the impatient
31 ============================
32
33 If you have a popular board then just start OpenOCD with its config,
34 e.g.:
35
36 openocd -f board/stm32f4discovery.cfg
37
38 If you are connecting a particular adapter with some specific target,
39 you need to source both the jtag interface and the target configs,
40 e.g.:
41
42 openocd -f interface/ftdi/jtagkey2.cfg -c "transport select jtag" \
43 -f target/ti_calypso.cfg
44
45 openocd -f interface/stlink-v2-1.cfg -c "transport select hla_swd" \
46 -f target/stm32l0.cfg
47
48 After OpenOCD startup, connect GDB with
49
50 (gdb) target extended-remote localhost:3333
51
52
53 =====================
54 OpenOCD Documentation
55 =====================
56
57 In addition to the in-tree documentation, the latest manuals may be
58 viewed online at the following URLs:
59
60 OpenOCD User's Guide:
61 http://openocd.org/doc/html/index.html
62
63 OpenOCD Developer's Manual:
64 http://openocd.org/doc/doxygen/html/index.html
65
66 These reflect the latest development versions, so the following section
67 introduces how to build the complete documentation from the package.
68
69 For more information, refer to these documents or contact the developers
70 by subscribing to the OpenOCD developer mailing list:
71
72 openocd-devel@lists.sourceforge.net
73
74 Building the OpenOCD Documentation
75 ----------------------------------
76
77 By default the OpenOCD build process prepares documentation in the
78 "Info format" and installs it the standard way, so that "info openocd"
79 can access it.
80
81 Additionally, the OpenOCD User's Guide can be produced in the
82 following different formats:
83
84 # If PDFVIEWER is set, this creates and views the PDF User Guide.
85 make pdf && ${PDFVIEWER} doc/openocd.pdf
86
87 # If HTMLVIEWER is set, this creates and views the HTML User Guide.
88 make html && ${HTMLVIEWER} doc/openocd.html/index.html
89
90 The OpenOCD Developer Manual contains information about the internal
91 architecture and other details about the code:
92
93 # NB! make sure doxygen is installed, type doxygen --version
94 make doxygen && ${HTMLVIEWER} doxygen/index.html
95
96
97 ==================
98 Supported hardware
99 ==================
100
101 JTAG adapters
102 -------------
103
104 AICE, ARM-JTAG-EW, ARM-USB-OCD, ARM-USB-TINY, AT91RM9200, axm0432,
105 BCM2835, Bus Blaster, Buspirate, Chameleon, CMSIS-DAP, Cortino, DENX,
106 Digilent JTAG-SMT2, DLC 5, DLP-USB1232H, embedded projects, eStick,
107 FlashLINK, FlossJTAG, Flyswatter, Flyswatter2, Gateworks, Hoegl, ICDI,
108 ICEBear, J-Link, JTAG VPI, JTAGkey, JTAGkey2, JTAG-lock-pick, KT-Link,
109 Lisa/L, LPC1768-Stick, MiniModule, NGX, NXHX, OOCDLink, Opendous,
110 OpenJTAG, Openmoko, OpenRD, OSBDM, Presto, Redbee, RLink, SheevaPlug
111 devkit, Stellaris evkits, ST-LINK (SWO tracing supported),
112 STM32-PerformanceStick, STR9-comStick, sysfsgpio, TUMPA, Turtelizer,
113 ULINK, USB-A9260, USB-Blaster, USB-JTAG, USBprog, VPACLink, VSLLink,
114 Wiggler, XDS100v2, Xverve.
115
116 Debug targets
117 -------------
118
119 ARM11, ARM7, ARM9, AVR32, Cortex-A, Cortex-R, Cortex-M, LS102x-SAP,
120 Feroceon/Dragonite, DSP563xx, DSP5680xx, FA526, MIPS EJTAG, NDS32,
121 XScale, Intel Quark.
122
123 Flash drivers
124 -------------
125
126 ADUC702x, AT91SAM, ATH79, AVR, CFI, DSP5680xx, EFM32, EM357, FM3, FM4, Kinetis,
127 LPC8xx/LPC1xxx/LPC2xxx/LPC541xx, LPC2900, LPCSPIFI, Marvell QSPI,
128 Milandr, NIIET, NuMicro, PIC32mx, PSoC4, SiM3x, Stellaris, STM32, STMSMI,
129 STR7x, STR9x, nRF51; NAND controllers of AT91SAM9, LPC3180, LPC32xx,
130 i.MX31, MXC, NUC910, Orion/Kirkwood, S3C24xx, S3C6400, XMC1xxx, XMC4xxx.
131
132
133 ==================
134 Installing OpenOCD
135 ==================
136
137 A Note to OpenOCD Users
138 -----------------------
139
140 If you would rather be working "with" OpenOCD rather than "on" it, your
141 operating system or JTAG interface supplier may provide binaries for
142 you in a convenient-enough package.
143
144 Such packages may be more stable than git mainline, where
145 bleeding-edge development takes place. These "Packagers" produce
146 binary releases of OpenOCD after the developers produces new "release"
147 versions of the source code. Previous versions of OpenOCD cannot be
148 used to diagnose problems with the current release, so users are
149 encouraged to keep in contact with their distribution package
150 maintainers or interface vendors to ensure suitable upgrades appear
151 regularly.
152
153 Users of these binary versions of OpenOCD must contact their Packager to
154 ask for support or newer versions of the binaries; the OpenOCD
155 developers do not support packages directly.
156
157 A Note to OpenOCD Packagers
158 ---------------------------
159
160 You are a PACKAGER of OpenOCD if you:
161
162 - Sell dongles and include pre-built binaries;
163 - Supply tools or IDEs (a development solution integrating OpenOCD);
164 - Build packages (e.g. RPM or DEB files for a GNU/Linux distribution).
165
166 As a PACKAGER, you will experience first reports of most issues.
167 When you fix those problems for your users, your solution may help
168 prevent hundreds (if not thousands) of other questions from other users.
169
170 If something does not work for you, please work to inform the OpenOCD
171 developers know how to improve the system or documentation to avoid
172 future problems, and follow-up to help us ensure the issue will be fully
173 resolved in our future releases.
174
175 That said, the OpenOCD developers would also like you to follow a few
176 suggestions:
177
178 - Send patches, including config files, upstream, participate in the
179 discussions;
180 - Enable all the options OpenOCD supports, even those unrelated to your
181 particular hardware;
182 - Use "ftdi" interface adapter driver for the FTDI-based devices.
183
184
185 ================
186 Building OpenOCD
187 ================
188
189 The INSTALL file contains generic instructions for running 'configure'
190 and compiling the OpenOCD source code. That file is provided by
191 default for all GNU autotools packages. If you are not familiar with
192 the GNU autotools, then you should read those instructions first.
193
194 The remainder of this document tries to provide some instructions for
195 those looking for a quick-install.
196
197 OpenOCD Dependencies
198 --------------------
199
200 GCC or Clang is currently required to build OpenOCD. The developers
201 have begun to enforce strict code warnings (-Wall, -Werror, -Wextra,
202 and more) and use C99-specific features: inline functions, named
203 initializers, mixing declarations with code, and other tricks. While
204 it may be possible to use other compilers, they must be somewhat
205 modern and could require extending support to conditionally remove
206 GCC-specific extensions.
207
208 You'll also need:
209
210 - make
211 - libtool
212 - pkg-config >= 0.23 (or compatible)
213
214 Additionally, for building from git:
215
216 - autoconf >= 2.64
217 - automake >= 1.14
218 - texinfo
219
220 USB-based adapters depend on libusb-1.0 and some older drivers require
221 libusb-0.1 or libusb-compat-0.1. A compatible implementation, such as
222 FreeBSD's, additionally needs the corresponding .pc files.
223
224 USB-Blaster, ASIX Presto and OpenJTAG interface adapter
225 drivers need:
226 - libftdi: http://www.intra2net.com/en/developer/libftdi/index.php
227
228 CMSIS-DAP support needs HIDAPI library.
229
230 Permissions delegation
231 ----------------------
232
233 Running OpenOCD with root/administrative permissions is strongly
234 discouraged for security reasons.
235
236 For USB devices on GNU/Linux you should use the contrib/60-openocd.rules
237 file. It probably belongs somewhere in /etc/udev/rules.d, but
238 consult your operating system documentation to be sure. Do not forget
239 to add yourself to the "plugdev" group.
240
241 For parallel port adapters on GNU/Linux and FreeBSD please change your
242 "ppdev" (parport* or ppi*) device node permissions accordingly.
243
244 For parport adapters on Windows you need to run install_giveio.bat
245 (it's also possible to use "ioperm" with Cygwin instead) to give
246 ordinary users permissions for accessing the "LPT" registers directly.
247
248 Compiling OpenOCD
249 -----------------
250
251 To build OpenOCD, use the following sequence of commands:
252
253 ./bootstrap (when building from the git repository)
254 ./configure [options]
255 make
256 sudo make install
257
258 The 'configure' step generates the Makefiles required to build
259 OpenOCD, usually with one or more options provided to it. The first
260 'make' step will build OpenOCD and place the final executable in
261 './src/'. The final (optional) step, ``make install'', places all of
262 the files in the required location.
263
264 To see the list of all the supported options, run
265 ./configure --help
266
267 Cross-compiling Options
268 -----------------------
269
270 Cross-compiling is supported the standard autotools way, you just need
271 to specify the cross-compiling target triplet in the --host option,
272 e.g. for cross-building for Windows 32-bit with MinGW on Debian:
273
274 ./configure --host=i686-w64-mingw32 [options]
275
276 To make pkg-config work nicely for cross-compiling, you might need an
277 additional wrapper script as described at
278
279 http://www.flameeyes.eu/autotools-mythbuster/pkgconfig/cross-compiling.html
280
281 This is needed to tell pkg-config where to look for the target
282 libraries that OpenOCD depends on. Alternatively, you can specify
283 *_CFLAGS and *_LIBS environment variables directly, see "./configure
284 --help" for the details.
285
286 Parallel Port Dongles
287 ---------------------
288
289 If you want to access the parallel port using the PPDEV interface you
290 have to specify both --enable-parport AND --enable-parport-ppdev, since the
291 the later option is an option to the parport driver.
292
293 The same is true for the --enable-parport-giveio option, you have to
294 use both the --enable-parport AND the --enable-parport-giveio option
295 if you want to use giveio instead of ioperm parallel port access
296 method.
297
298
299 ==========================
300 Obtaining OpenOCD From GIT
301 ==========================
302
303 You can download the current GIT version with a GIT client of your
304 choice from the main repository:
305
306 git://git.code.sf.net/p/openocd/code
307
308 You may prefer to use a mirror:
309
310 http://repo.or.cz/r/openocd.git
311 git://repo.or.cz/openocd.git
312
313 Using the GIT command line client, you might use the following command
314 to set up a local copy of the current repository (make sure there is no
315 directory called "openocd" in the current directory):
316
317 git clone git://git.code.sf.net/p/openocd/code openocd
318
319 Then you can update that at your convenience using
320
321 git pull
322
323 There is also a gitweb interface, which you can use either to browse
324 the repository or to download arbitrary snapshots using HTTP:
325
326 http://repo.or.cz/w/openocd.git
327
328 Snapshots are compressed tarballs of the source tree, about 1.3 MBytes
329 each at this writing.

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)