David Brownell <david-b@pacbell.net>:
[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, debug target
6 support (e.g. ARM, MIPS), and flash chip drivers (e.g. CFI, NAND, etc.).
7 Several network interfaces are available for interactiving with OpenOCD:
8 HTTP, telnet, TCL, and GDB. The GDB server enables OpenOCD to function
9 as a "remote target" for source-level debugging of embedded systems
10 using the GNU GDB program.
11
12 This README file contains an overview of the following topics:
13 - how to find and build more OpenOCD documentation,
14 - the build process
15 - packaging tips.
16 - configuration options
17
18 =====================
19 OpenOCD Documentation
20 =====================
21
22 In addition to in-tree documentation, the latest documentation may be
23 viewed on-line at the following URLs:
24
25 OpenOCD User's Guide:
26 http://openocd.berlios.de/doc/html/index.html
27
28 OpenOCD Developer's Manual:
29 http://openocd.berlios.de/doc/doxygen/index.html
30
31 These reflect the latest development versions, so the following section
32 introduces how to build the complete documentation from the package.
33
34
35 For more information, refer to these documents or contact the developers
36 by subscribing to the OpenOCD developer mailing list:
37
38 openocd-development@lists.berlios.de
39
40 Building the OpenOCD Documentation
41 ----------------------------------
42
43 The OpenOCD User's Guide can be produced in two different format:
44
45 # If PDFVIEWER is set, this creates and views the PDF User Guide.
46 make pdf && ${PDFVIEWER} doc/openocd.pdf
47
48 # If HTMLVIEWER is set, this creates and views the HTML User Guide.
49 make html && ${HTMLVIEWER} doc/openocd.html/index.html
50
51 The OpenOCD Developer Manual contains information about the internal
52 architecture and other details about the code:
53
54 make doxygen
55
56 # If HTMLVIEWER is set, this views the HTML Doxygen output.
57 ${HTMLVIEWER} doxyegen/index.html
58
59 The remaining sections describe how to configure the system such that
60 you can build the in-tree documentation.
61
62 ==================
63 Installing OpenOCD
64 ==================
65
66 A Note to OpenOCD Users
67 -----------------------
68
69 If you would rather be working "with" OpenOCD rather than "on" it, your
70 operating system or interface supplier may provide binaries for you in a
71 convenient package.
72
73 Such packages should be more stable than SVN trunk, where bleeding-edge
74 development takes place. These "Packagers" produce binary releases of
75 OpenOCD after the developers produces new "stable" versions of the
76 source code. Previous versions of OpenOCD cannot be used to diagnosed
77 problems with the current release, so users are encouraged to keep in
78 contact with their distribution package maintainers or interface vendors
79 to ensure suitable upgrades appear regularly.
80
81 Users of these binary versions of OpenOCD must contact their Packager to
82 ask for support or newer versions of the binaries; the OpenOCD
83 developers do not support packages directly.
84
85 A Note to OpenOCD Packagers
86 ---------------------------
87
88 You are a PACKAGER of OpenOCD if you:
89
90 - Sell dongles: and include pre-built binaries
91 - Supply tools: A complete development solution
92 - Supply IDEs: like Eclipse, or RHIDE, etc.
93 - Build packages: RPM files, or DEB files for a Linux Distro
94
95 As a PACKAGER, you will experience first reports of most issues.
96 When you fix those problems for your users, your solution may help
97 prevent hundreds (if not thousands) of other questions from other users.
98
99 If something does not work for you, please work to inform the OpenOCD
100 developers know how to improve the system or documentation to avoid
101 future problems, and follow-up to help us ensure the issue will be fully
102 resolved in our future releases.
103
104 That said, the OpenOCD developers would also like you to follow a few
105 suggestions:
106
107 - Send patches, including config files, upstream.
108 - Always build with printer ports enabled.
109 - Use libftdi + libusb for FT2232 support.
110
111 Remember, the FTD2XX library cannot be used in binary distributions, due
112 to restrictions of the GPL v2.
113
114 ================
115 Building OpenOCD
116 ================
117
118 The INSTALL file contains generic instructions for running 'configure'
119 and compiling the OpenOCD source code. That file is provided by default
120 for all GNU automake packages, and
121
122 if you are not familiar with the GNU autotools, then you should read
123 those instructions first.
124 Still, the
125 remainder of this document tries to provide complete instructions for
126 those looking for a quick-install
127
128 OpenOCD Dependencies
129 --------------------
130
131 Presently, GCC is required to build OpenOCD. The developers have begun
132 to enforce strict code warnings (-Wall, -Werror, -Wextra, and more) and
133 use C99-specific features: inline functions, named initializers, mixing
134 declarations with code, and other tricks. While it may be possible to
135 use other compilers, they must be somewhat modern and could require
136 extending support to conditionally remove GCC-specific extensions.
137
138 Also, you need to install the appropriate driver files, if you want to
139 build support for a USB or FTDI-based interface:
140
141 - ft2232, jlink, rlink, vsllink, usbprog, arm-jtag-ew:
142 - libusb: required for portable communication with USB dongles
143 - ft2232 also requires:
144 - libftdi: http://www.intra2net.com/opensource/ftdi/ *OR*
145 - ftd2xx: http://www.ftdichip.com/Drivers/D2XX.htm,
146 or the Amontec version (from @uref{http://www.amontec.com}), for
147 easier support of JTAGkey's vendor and product IDs.
148
149 Many Linux distributions provide these packages through their automated
150 installation and update mechanisms.
151
152 Compiling OpenOCD
153 -----------------
154
155 To build OpenOCD (on both Linux and Cygwin), use the following sequence
156 of commands:
157
158 ./configure [with some options listed in the next section]
159 make
160 make install
161
162 The 'configure' step generates the Makefiles required to build OpenOCD,
163 usually with one or more options provided to it. The first 'make' step
164 will build OpenOCD and place the final executable in ./src/. The
165 final (optional) step, ``make install'', places all of the files in the
166 required location.
167
168 Configuration Options
169 ---------------------
170
171 The configure script takes numerous options, specifying which JTAG
172 interfaces should be included (among other things). The following list
173 of options was extracted from the output of './configure --help'. Other
174 options may be available there:
175
176 --enable-maintainer-mode enable make rules and dependencies not useful
177 (and sometimes confusing) to the casual installer
178 NOTE: This option is *required* for SVN builds!
179 It should *not* be used to build a release.
180
181 --enable-dummy Enable building the dummy JTAG port driver
182
183 --enable-ft2232_libftdi Enable building support for FT2232 based devices
184 using the libftdi driver, opensource alternate of
185 FTD2XX
186 --enable-ft2232_ftd2xx Enable building support for FT2232 based devices
187 using the FTD2XX driver from ftdichip.com
188 --enable-ftd2xx-highspeed
189 Enable building support for FT2232H and
190 FT4232H-based devices (requires >=libftd2xx-0.4.16)
191
192 --enable-gw16012 Enable building support for the Gateworks GW16012
193 JTAG Programmer
194
195 --enable-parport Enable building the pc parallel port driver
196 --disable-parport-ppdev Disable use of ppdev (/dev/parportN) for parport
197 (for x86 only)
198 --enable-parport-giveio Enable use of giveio for parport (for CygWin only)
199
200 --enable-presto_libftdi Enable building support for ASIX Presto Programmer
201 using the libftdi driver
202 --enable-presto_ftd2xx Enable building support for ASIX Presto Programmer
203 using the FTD2XX driver
204
205 --enable-amtjtagaccel Enable building the Amontec JTAG-Accelerator driver
206 --enable-arm-jtag-ew Enable building support for the Olimex ARM-JTAG-EW
207 Programmer
208 --enable-jlink Enable building support for the Segger J-Link JTAG
209 Programmer
210 --enable-rlink Enable building support for the Raisonance RLink
211 JTAG Programmer
212 --enable-usbprog Enable building support for the usbprog JTAG
213 Programmer
214 --enable-vsllink Enable building support for the Versaloon-Link JTAG
215 Programmer
216
217 --enable-oocd_trace Enable building support for the OpenOCD+trace ETM
218 capture device
219
220 --enable-ep93xx Enable building support for EP93xx based SBCs
221 --enable-at91rm9200 Enable building support for AT91RM9200 based SBCs
222
223 --enable-ecosboard Enable building support for eCos based JTAG debugger
224 --enable-zy1000 Enable ZY1000 interface
225
226 --enable-minidriver-dummy
227 Enable the dummy minidriver.
228
229 --enable-ioutil Enable ioutil functions - useful for standalone
230 OpenOCD implementations
231 --enable-httpd Enable builtin httpd server - useful for standalone
232 OpenOCD implementations
233
234 Miscellaneous Configure Options
235 -------------------------------
236
237 The following additional options may also be useful:
238
239 --disable-assert turn off assertions
240
241 --enable-verbose Enable verbose JTAG I/O messages (for debugging).
242 --enable-verbose-jtag-io
243 Enable verbose JTAG I/O messages (for debugging).
244 --enable-verbose-usb-io Enable verbose USB I/O messages (for debugging)
245 --enable-verbose-usb-comms
246 Enable verbose USB communication messages (for
247 debugging)
248 --enable-malloc-logging Include free space in logging messages (requires
249 malloc.h).
250
251 --disable-gccwarnings Disable extra gcc warnings during build.
252 --disable-wextra Disable extra compiler warnings
253 --disable-werror Do not treat warnings as errors
254
255 --enable-release Enable building of an OpenOCD release. This
256 option is intended for project maintainers.
257 It simply omits the svn version string when
258 the openocd -v is executed (to KISS).
259
260 --disable-option-checking
261 Ignore unrecognized --enable and --with options.
262 --disable-dependency-tracking speeds up one-time build
263 --enable-shared[=PKGS] build shared libraries [default=no]
264 --enable-static[=PKGS] build static libraries [default=yes]
265
266 Parallel Port Dongles
267 ---------------------
268
269 If you want to access the parallel port using the PPDEV interface you
270 have to specify both --enable-parport AND --enable-parport-ppdev, since the
271 the later option is an option to the parport driver (see
272 http://forum.sparkfun.com/viewtopic.php?t=3795 for more info).
273
274 The same is true for the --enable-parport-giveio option, you
275 have to use both the --enable-parport AND the --enable-parport-giveio
276 option if you want to use giveio instead of ioperm parallel port access
277 method.
278
279 FT2232C Based USB Dongles
280 -------------------------
281
282 There are 2 methods of using the FTD2232, either (1) using the
283 FTDICHIP.COM closed source driver, or (2) the open (and free) driver
284 libftdi.
285
286 Using LIBFTDI
287 -------------
288
289 For both Linux and Windows, both libusb and libftdi must be built and
290 installed. To use the newer FT2232H chips, supporting RTCK and USB high
291 speed (480 Mbps), you need libftdi version 0.16 or newer. Many Linux
292 distributions provide suitable packages for these libraries.
293
294 For Windows, libftdi is supported with versions 0.14 and later.
295
296 With these prerequisites met, configure the libftdi solution like this:
297
298 ./configure --prefix=/path/for/your/install --enable-ft2232_libftdi
299
300 Then type ``make'', and perhaps ``make install''.
301
302 Using FTDI's FTD2XX
303 -------------------
304
305 Some claim the (closed) FTDICHIP.COM solution is faster, which
306 is the motivation for supporting it even though its licensing restricts
307 it to non-redistributable OpenOCD binaries, and it is not available for
308 all operating systems used with OpenOCD. You may, however, build such
309 copies for personal use.
310
311 The FTDICHIP drivers come as either a (win32) ZIP file, or a (Linux)
312 TAR.GZ file. You must unpack them ``some where'' convient. As of this
313 writing FTDICHIP does not supply means to install these files "in an
314 appropriate place."
315
316 If your distribution does not package these, there are several
317 './configure' options to solve this problem:
318
319 --with-ftd2xx-win32-zipdir
320 Where (CYGWIN/MINGW) the zip file from ftdichip.com
321 was unpacked <default=search>
322 --with-ftd2xx-linux-tardir
323 Where (Linux/Unix) the tar file from ftdichip.com
324 was unpacked <default=search>
325 --with-ftd2xx-lib Use static or shared ftd2xx libs on default static
326
327 If you are using the FTDICHIP.COM driver, download and unpack the
328 Windows or Linux FTD2xx drivers from the following location:
329
330 http://www.ftdichip.com/Drivers/D2XX.htm
331
332 Remember, this library is binary-only, while OpenOCD is licenced
333 according to GNU GPLv2 without any exceptions. That means that
334 _distributing_ copies of OpenOCD built with the FTDI code would violate
335 the OpenOCD licensing terms.
336
337
338 Cygwin/Win32 Notes
339 ******************
340
341 The Cygwin/Win32 ZIP file contains a directory named ftd2xx.win32.
342 Assuming that you have extracted this archive in the same directory as
343 the OpenOCD package, you could configure with options like the following:
344
345 ./configure \
346 --enable-ft2232_ftd2xx \
347 --with-ftd2xx-win32-zipdir=../ftd2xx.win32 \
348 ... other options ...
349
350 Linux Notes
351 ***********
352
353 The Linux tar.gz archive contains a directory named libftd2xx0.4.16
354 (or similar). Assuming that you have extracted this archive in the same
355 directory as the OpenOCD package, you could configure with options like
356 the following:
357
358 ./configure \
359 --enable-ft2232_ftd2xx \
360 --with-ft2xx-linux-tardir=../libftd2xx0.4.16 \
361 ... other options ...
362
363 =================================
364 Obtaining OpenOCD From Subversion
365 ---------------------------------
366
367 You can download the current SVN version with an SVN client of your
368 choice from the following repositories:
369
370 svn://svn.berlios.de/openocd/trunk
371 or
372 http://svn.berlios.de/svnroot/repos/openocd/trunk
373
374 Using the SVN command line client, you can use the following command to
375 fetch the latest version (make sure there is no (non-svn) directory
376 called "openocd" in the current directory):
377
378 svn checkout svn://svn.berlios.de/openocd/trunk openocd
379
380 If you prefer GIT based tools, the @command{git-svn} package works too:
381
382 git svn clone -s svn://svn.berlios.de/openocd
383
384 Tips For Building From The Subversion Repository
385 ************************************************
386
387 Building OpenOCD from a repository requires a recent version of the GNU
388 autotools (autoconf >= 2.59 and automake >= 1.9). For building on
389 Windows, you have to use Cygwin. Make sure that your @env{PATH}
390 environment variable contains no other locations with Unix utils (like
391 UnxUtils) - these can't handle the Cygwin paths, resulting in obscure
392 dependency errors. This was an observation gathered from the logs of
393 one user; please correct us if this is wrong.
394
395 1) Run './bootstrap' to create the 'configure' script and prepare
396 the build process for your host system.
397
398 2) Run './configure --enable-maintainer-mode' with other options.
399
400

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)