• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

contrib/H03-May-2022-24,09715,962

doc/H07-Mar-2021-24,66120,434

jimtcl/H03-May-2022-318,432210,093

src/H07-Mar-2021-370,100267,562

tcl/H07-Mar-2021-35,82528,344

tools/H07-Mar-2021-832620

AUTHORSH A D09-Dec-2020477 1312

BUGSH A D09-Dec-20202.5 KiB7560

COPYINGH A D09-Dec-202017.7 KiB340281

ChangeLogH A D07-Mar-20211.7 MiB32,45123,527

Doxyfile.inH A D23-Jan-202161.8 KiB1,5181,091

HACKINGH A D09-Dec-20209.3 KiB243209

INSTALLH A D07-Mar-202115.4 KiB369287

Makefile.amH A D07-Mar-20213.3 KiB144113

Makefile.inH A D07-Mar-2021507.3 KiB6,6116,184

NEWSH A D07-Mar-20218.6 KiB239223

NEWS-0.10.0H A D09-Dec-20206 KiB156141

NEWS-0.2.0H A D09-Dec-20203.6 KiB8169

NEWS-0.3.0H A D09-Dec-20203.2 KiB8372

NEWS-0.4.0H A D09-Dec-20203.6 KiB9987

NEWS-0.5.0H A D09-Dec-20202.6 KiB7461

NEWS-0.6.0H A D09-Dec-20201.7 KiB5544

NEWS-0.7.0H A D09-Dec-20201.2 KiB4433

NEWS-0.8.0H A D09-Dec-20203.7 KiB11297

NEWS-0.9.0H A D09-Dec-20204.1 KiB11196

NEWTAPSH A D09-Dec-20203.9 KiB14690

READMEH A D24-Jan-202111.6 KiB341243

README.WindowsH A D09-Dec-20202.3 KiB6144

README.macOSH A D24-Jan-20211.9 KiB5539

TODOH A D09-Dec-202016.2 KiB394324

aclocal.m4H A D07-Mar-2021378.7 KiB10,5749,559

compileH A D07-Mar-20217.2 KiB349259

config.guessH A D07-Mar-202143.2 KiB1,4811,288

config.h.inH A D07-Mar-20218.9 KiB356239

config.subH A D07-Mar-202135.3 KiB1,8021,661

config_subdir.m4H A D09-Dec-2020811 2724

configureH A D03-May-2022557.8 KiB20,30816,535

configure.acH A D07-Mar-202130.8 KiB910778

depcompH A D07-Mar-202123 KiB792502

install-shH A D07-Mar-202115 KiB519337

ltmain.shH A D07-Mar-2021319.4 KiB11,2508,044

mdate-shH A D07-Mar-20216 KiB229119

missingH A D07-Mar-20216.7 KiB216143

texinfo.texH A D07-Mar-2021373.3 KiB11,72810,913

README

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

README.Windows

1Building OpenOCD for Windows
2----------------------------
3
4You can build OpenOCD for Windows natively with either MinGW-w64/MSYS
5or Cygwin (plain MinGW might work with --disable-werror but is not
6recommended as it doesn't provide enough C99 compatibility).
7Alternatively, one can cross-compile it using MinGW-w64 on a *nix
8host. See README for the generic instructions.
9
10Also, the MSYS2 project provides both ready-made binaries and an easy
11way to self-compile from their software repository out of the box.
12
13Native MinGW-w64/MSYS compilation
14-----------------------------
15
16As MSYS doesn't come with pkg-config pre-installed, you need to add it
17manually. The easiest way to do that is to download pkg-config-lite
18from:
19
20  http://sourceforge.net/projects/pkgconfiglite/
21
22Then simply unzip the archive to the root directory of your MinGW-w64
23installation.
24
25USB adapters
26------------
27
28For the adapters that use a HID-based protocol, e.g. CMSIS-DAP, you do
29not need to perform any additional configuration.
30
31For all the others you usually need to have WinUSB.sys (or
32libusbK.sys) driver installed. Some vendor software (e.g. for
33ST-LINKv2) does it on its own. For the other cases the easiest way to
34assign WinUSB to a device is to use the latest Zadig installer:
35
36  http://zadig.akeo.ie
37
38When using a composite USB device, it's often necessary to assign
39WinUSB.sys to the composite parent instead of the specific
40interface. To do that one needs to activate an advanced option in the
41Zadig installer.
42
43For the old drivers that use libusb-0.1 API you might need to link
44against libusb-win32 headers and install the corresponding driver with
45Zadig.
46
47If you need to use the same adapter with other applications that may
48require another driver, a solution for Windows Vista and above is to
49activate the IgnoreHWSerNum registry setting for the USB device.
50
51That setting forces Windows to associate the driver per port instead of
52per serial number, the same behaviour as when the device does not contain
53a serial number. So different drivers can be installed for the adapter on
54different ports and you just need to plug the adapter into the correct
55port depending on which application to use.
56
57For more information, see:
58
59  http://msdn.microsoft.com/en-us/library/windows/hardware/jj649944(v=vs.85).aspx
60  http://www.ftdichip.com/Support/Knowledgebase/index.html?ignorehardwareserialnumber.htm
61

README.macOS

1Building OpenOCD for macOS
2--------------------------
3
4There are a few prerequisites you will need first:
5
6- Xcode (install from the AppStore)
7- Command Line Tools (install from Xcode -> Preferences -> Downloads)
8- Gentoo Prefix (http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap.xml)
9  or
10- Homebrew (http://mxcl.github.io/homebrew/)
11  or
12- MacPorts (http://www.macports.org/install.php)
13
14
15If you're building manually you need Texinfo version 5.0 or later. The
16simplest way to get it is to use Homebrew (brew install texinfo) and
17then ``export PATH=/usr/local/opt/texinfo/bin:$PATH``.
18
19
20With Gentoo Prefix you can build the release version or the latest
21devel version (-9999) the usual way described in the Gentoo
22documentation. Alternatively, install the prerequisites and build
23manually from the sources.
24
25
26With Homebrew you can either run:
27  brew install [--HEAD] openocd (where optional --HEAD asks brew to
28                                 install the current git version)
29    or
30  brew install libtool automake libusb [libusb-compat] [hidapi] [libftdi]
31    (to install the needed dependencies and then proceed with the
32     manual building procedure)
33
34
35For building with MacPorts you need to run:
36  sudo port install libtool automake autoconf pkgconfig \
37    libusb [libusb-compat] [libftdi1]
38
39You should also specify LDFLAGS and CPPFLAGS to allow configure to use
40MacPorts' libraries, so run configure like this:
41  LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include ./configure [options]
42
43
44See README for the generic building instructions.
45
46If you're using a USB adapter and have a driver kext matched to it,
47you will need to unload it prior to running OpenOCD. E.g. with Apple
48driver (OS X 10.9 or later) for FTDI run:
49  sudo kextunload -b com.apple.driver.AppleUSBFTDI
50for FTDI vendor driver use:
51  sudo kextunload FTDIUSBSerialDriver.kext
52
53To learn more on the topic please refer to the official libusb FAQ:
54https://github.com/libusb/libusb/wiki/FAQ
55