esp32s2: convert counted timeout to timeval_ms
[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.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, BCM2835,
105 Bus Blaster, Buspirate, Cadence DPI, Chameleon, CMSIS-DAP, Cortino,
106 Cypress KitProg, DENX, Digilent JTAG-SMT2, DLC 5, DLP-USB1232H,
107 embedded projects, eStick, FlashLINK, FlossJTAG, Flyswatter, Flyswatter2,
108 FTDI FT232R, Gateworks, Hoegl, ICDI, ICEBear, J-Link, JTAG VPI, JTAGkey,
109 JTAGkey2, JTAG-lock-pick, KT-Link, Linux GPIOD, Lisa/L, LPC1768-Stick,
110 Mellanox rshim, MiniModule, NGX, Nuvoton Nu-Link, Nu-Link2, NXHX, NXP IMX GPIO,
111 OOCDLink, Opendous, OpenJTAG, Openmoko, OpenRD, OSBDM, Presto, Redbee,
112 Remote Bitbang, RLink, SheevaPlug devkit, Stellaris evkits,
113 ST-LINK (SWO tracing supported), STM32-PerformanceStick, STR9-comStick,
114 sysfsgpio, TI XDS110, TUMPA, Turtelizer, ULINK, USB-A9260, USB-Blaster,
115 USB-JTAG, USBprog, VPACLink, VSLLink, Wiggler, XDS100v2, Xilinx XVC/PCIe,
116 Xverve.
117
118 Debug targets
119 -------------
120
121 ARM: AArch64, ARM11, ARM7, ARM9, Cortex-A/R (v7-A/R), Cortex-M (ARMv{6/7/8}-M),
122 FA526, Feroceon/Dragonite, XScale.
123 ARCv2, AVR32, DSP563xx, DSP5680xx, EnSilica eSi-RISC, EJTAG (MIPS32, MIPS64),
124 Intel Quark, LS102x-SAP, NDS32, RISC-V, ST STM8.
125
126 Flash drivers
127 -------------
128
129 ADUC702x, AT91SAM, AT91SAM9 (NAND), ATH79, ATmega128RFA1, Atmel SAM, AVR, CFI,
130 DSP5680xx, EFM32, EM357, eSi-RISC, eSi-TSMC, EZR32HG, FM3, FM4, Freedom E SPI,
131 i.MX31, Kinetis, LPC8xx/LPC1xxx/LPC2xxx/LPC541xx, LPC2900, LPC3180, LPC32xx,
132 LPCSPIFI, Marvell QSPI, MAX32, Milandr, MXC, NIIET, nRF51, nRF52 , NuMicro,
133 NUC910, Orion/Kirkwood, PIC32mx, PSoC4/5LP/6, Renesas RPC HF and SH QSPI,
134 S3C24xx, S3C6400, SiM3x, SiFive Freedom E, Stellaris, ST BlueNRG, STM32,
135 STM32 QUAD/OCTO-SPI for Flash/FRAM/EEPROM, STMSMI, STR7x, STR9x, SWM050,
136 TI CC13xx, TI CC26xx, TI CC32xx, TI MSP432, Winner Micro w600, Xilinx XCF,
137 XMC1xxx, XMC4xxx.
138
139
140 ==================
141 Installing OpenOCD
142 ==================
143
144 A Note to OpenOCD Users
145 -----------------------
146
147 If you would rather be working "with" OpenOCD rather than "on" it, your
148 operating system or JTAG interface supplier may provide binaries for
149 you in a convenient-enough package.
150
151 Such packages may be more stable than git mainline, where
152 bleeding-edge development takes place. These "Packagers" produce
153 binary releases of OpenOCD after the developers produces new "release"
154 versions of the source code. Previous versions of OpenOCD cannot be
155 used to diagnose problems with the current release, so users are
156 encouraged to keep in contact with their distribution package
157 maintainers or interface vendors to ensure suitable upgrades appear
158 regularly.
159
160 Users of these binary versions of OpenOCD must contact their Packager to
161 ask for support or newer versions of the binaries; the OpenOCD
162 developers do not support packages directly.
163
164 A Note to OpenOCD Packagers
165 ---------------------------
166
167 You are a PACKAGER of OpenOCD if you:
168
169 - Sell dongles and include pre-built binaries;
170 - Supply tools or IDEs (a development solution integrating OpenOCD);
171 - Build packages (e.g. RPM or DEB files for a GNU/Linux distribution).
172
173 As a PACKAGER, you will experience first reports of most issues.
174 When you fix those problems for your users, your solution may help
175 prevent hundreds (if not thousands) of other questions from other users.
176
177 If something does not work for you, please work to inform the OpenOCD
178 developers know how to improve the system or documentation to avoid
179 future problems, and follow-up to help us ensure the issue will be fully
180 resolved in our future releases.
181
182 That said, the OpenOCD developers would also like you to follow a few
183 suggestions:
184
185 - Send patches, including config files, upstream, participate in the
186 discussions;
187 - Enable all the options OpenOCD supports, even those unrelated to your
188 particular hardware;
189 - Use "ftdi" interface adapter driver for the FTDI-based devices.
190
191
192 ================
193 Building OpenOCD
194 ================
195
196 The INSTALL file contains generic instructions for running 'configure'
197 and compiling the OpenOCD source code. That file is provided by
198 default for all GNU autotools packages. If you are not familiar with
199 the GNU autotools, then you should read those instructions first.
200
201 The remainder of this document tries to provide some instructions for
202 those looking for a quick-install.
203
204 OpenOCD Dependencies
205 --------------------
206
207 GCC or Clang is currently required to build OpenOCD. The developers
208 have begun to enforce strict code warnings (-Wall, -Werror, -Wextra,
209 and more) and use C99-specific features: inline functions, named
210 initializers, mixing declarations with code, and other tricks. While
211 it may be possible to use other compilers, they must be somewhat
212 modern and could require extending support to conditionally remove
213 GCC-specific extensions.
214
215 You'll also need:
216
217 - make
218 - libtool
219 - pkg-config >= 0.23 (or compatible)
220
221 Additionally, for building from git:
222
223 - autoconf >= 2.69
224 - automake >= 1.14
225 - texinfo >= 5.0
226
227 USB-based adapters depend on libusb-1.0. A compatible implementation, such as
228 FreeBSD's, additionally needs the corresponding .pc files.
229
230 USB-Blaster, ASIX Presto and OpenJTAG interface adapter
231 drivers need:
232 - libftdi: http://www.intra2net.com/en/developer/libftdi/index.php
233
234 CMSIS-DAP support needs HIDAPI library.
235
236 Permissions delegation
237 ----------------------
238
239 Running OpenOCD with root/administrative permissions is strongly
240 discouraged for security reasons.
241
242 For USB devices on GNU/Linux you should use the contrib/60-openocd.rules
243 file. It probably belongs somewhere in /etc/udev/rules.d, but
244 consult your operating system documentation to be sure. Do not forget
245 to add yourself to the "plugdev" group.
246
247 For parallel port adapters on GNU/Linux and FreeBSD please change your
248 "ppdev" (parport* or ppi*) device node permissions accordingly.
249
250 For parport adapters on Windows you need to run install_giveio.bat
251 (it's also possible to use "ioperm" with Cygwin instead) to give
252 ordinary users permissions for accessing the "LPT" registers directly.
253
254 Compiling OpenOCD
255 -----------------
256
257 To build OpenOCD, use the following sequence of commands:
258
259 ./bootstrap (when building from the git repository)
260 ./configure [options]
261 make
262 sudo make install
263
264 The 'configure' step generates the Makefiles required to build
265 OpenOCD, usually with one or more options provided to it. The first
266 'make' step will build OpenOCD and place the final executable in
267 './src/'. The final (optional) step, ``make install'', places all of
268 the files in the required location.
269
270 To see the list of all the supported options, run
271 ./configure --help
272
273 Cross-compiling Options
274 -----------------------
275
276 Cross-compiling is supported the standard autotools way, you just need
277 to specify the cross-compiling target triplet in the --host option,
278 e.g. for cross-building for Windows 32-bit with MinGW on Debian:
279
280 ./configure --host=i686-w64-mingw32 [options]
281
282 To make pkg-config work nicely for cross-compiling, you might need an
283 additional wrapper script as described at
284
285 https://autotools.io/pkgconfig/cross-compiling.html
286
287 This is needed to tell pkg-config where to look for the target
288 libraries that OpenOCD depends on. Alternatively, you can specify
289 *_CFLAGS and *_LIBS environment variables directly, see "./configure
290 --help" for the details.
291
292 For a more or less complete script that does all this for you, see
293
294 contrib/cross-build.sh
295
296 Parallel Port Dongles
297 ---------------------
298
299 If you want to access the parallel port using the PPDEV interface you
300 have to specify both --enable-parport AND --enable-parport-ppdev, since
301 the later option is an option to the parport driver.
302
303 The same is true for the --enable-parport-giveio option, you have to
304 use both the --enable-parport AND the --enable-parport-giveio option
305 if you want to use giveio instead of ioperm parallel port access
306 method.
307
308
309 ==========================
310 Obtaining OpenOCD From GIT
311 ==========================
312
313 You can download the current GIT version with a GIT client of your
314 choice from the main repository:
315
316 git://git.code.sf.net/p/openocd/code
317
318 You may prefer to use a mirror:
319
320 http://repo.or.cz/r/openocd.git
321 git://repo.or.cz/openocd.git
322
323 Using the GIT command line client, you might use the following command
324 to set up a local copy of the current repository (make sure there is no
325 directory called "openocd" in the current directory):
326
327 git clone git://git.code.sf.net/p/openocd/code openocd
328
329 Then you can update that at your convenience using
330
331 git pull
332
333 There is also a gitweb interface, which you can use either to browse
334 the repository or to download arbitrary snapshots using HTTP:
335
336 http://repo.or.cz/w/openocd.git
337
338 Snapshots are compressed tarballs of the source tree, about 1.3 MBytes
339 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)