openocd-esp32 0.0.0.dev0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
1
+ OpenOCD is provided under:
2
+
3
+ SPDX-License-Identifier: GPL-2.0-or-later
4
+
5
+ Being under the terms of the GNU General Public License version 2 or
6
+ later, according with:
7
+
8
+ LICENSES/preferred/GPL-2.0
9
+
10
+ In addition, other licenses may also apply. Please see:
11
+
12
+ LICENSES/license-rules.txt
13
+
14
+ for more details.
15
+
16
+ All contributions to OpenOCD are subject to this COPYING file.
@@ -0,0 +1,390 @@
1
+ Metadata-Version: 2.4
2
+ Name: openocd-esp32
3
+ Version: 0.0.0.dev0
4
+ Summary: OpenOCD for Espressif chips (ESP32, ESP32-S2, ESP32-S3, ESP32-C3, etc.)
5
+ Author: Espressif Systems
6
+ License: GPL-2.0-or-later
7
+ Project-URL: Homepage, https://github.com/espressif/openocd-esp32
8
+ Project-URL: Documentation, https://docs.espressif.com/projects/openocd-esp32
9
+ Project-URL: Repository, https://github.com/espressif/openocd-esp32
10
+ Project-URL: Issues, https://github.com/espressif/openocd-esp32/issues
11
+ Keywords: openocd,esp32,espressif,debugger,jtag,embedded
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
16
+ Classifier: Operating System :: MacOS :: MacOS X
17
+ Classifier: Operating System :: Microsoft :: Windows
18
+ Classifier: Operating System :: POSIX :: Linux
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Topic :: Software Development :: Debuggers
26
+ Classifier: Topic :: Software Development :: Embedded Systems
27
+ Requires-Python: >=3.9
28
+ Description-Content-Type: text/markdown
29
+ License-File: COPYING
30
+ Dynamic: license-file
31
+
32
+ # Welcome to OpenOCD
33
+
34
+ OpenOCD provides on-chip programming and debugging support with a
35
+ layered architecture of JTAG interface and TAP support including:
36
+
37
+ - (X)SVF playback to facilitate automated boundary scan and FPGA/CPLD
38
+ programming;
39
+ - debug target support (e.g. ARM, MIPS): single-stepping,
40
+ breakpoints/watchpoints, gprof profiling, etc;
41
+ - flash chip drivers (e.g. CFI, NAND, internal flash);
42
+ - embedded Tcl interpreter for easy scripting.
43
+
44
+ Several network interfaces are available for interacting with OpenOCD:
45
+ telnet, Tcl, and GDB. The GDB server enables OpenOCD to function as a
46
+ "remote target" for source-level debugging of embedded systems using
47
+ the GNU GDB program (and the others who talk GDB protocol, e.g. IDA
48
+ Pro).
49
+
50
+ This README file contains an overview of the following topics:
51
+
52
+ - quickstart instructions,
53
+ - how to find and build more OpenOCD documentation,
54
+ - list of the supported hardware,
55
+ - the installation and build process,
56
+ - packaging tips.
57
+
58
+ ## Quickstart for the impatient
59
+
60
+ If you have a popular board then just start OpenOCD with its config,
61
+ e.g.:
62
+
63
+ ```sh
64
+ openocd -f board/stm32f4discovery.cfg
65
+ ```
66
+
67
+ If you are connecting a particular adapter with some specific target,
68
+ you need to source both the jtag interface and the target configs,
69
+ e.g.:
70
+
71
+ ```sh
72
+ openocd -f interface/ftdi/jtagkey2.cfg -c "transport select jtag" \
73
+ -f target/ti/calypso.cfg
74
+ ```
75
+
76
+ ```sh
77
+ openocd -f interface/stlink.cfg -c "transport select swd" \
78
+ -f target/stm32l0.cfg
79
+ ```
80
+
81
+ After OpenOCD startup, connect GDB with
82
+
83
+ ```gdb
84
+ (gdb) target extended-remote localhost:3333
85
+ ```
86
+
87
+ ## Installing OpenOCD
88
+
89
+ The easiest way to install OpenOCD is through your operating system's package
90
+ manager.
91
+
92
+ - Debian / Ubuntu
93
+
94
+ ```sh
95
+ sudo apt install openocd
96
+ ```
97
+
98
+ - Fedora
99
+
100
+ ```sh
101
+ sudo dnf install openocd
102
+ ```
103
+
104
+ - macOS (via Homebrew)
105
+
106
+ ```sh
107
+ brew install open-ocd
108
+ ```
109
+
110
+ - Windows (via MSYS2)
111
+
112
+ ```sh
113
+ pacman -S mingw-w64-x86_64-openocd
114
+ ```
115
+
116
+ These packages are often more stable than the bleeding-edge Git mainline, where
117
+ active development happens.
118
+ "Packagers" create binary releases of OpenOCD after the developers publish new
119
+ source code releases.
120
+ Older OpenOCD versions are not suitable for diagnosing issues in the current
121
+ release.
122
+ Users should stay in touch with their distribution maintainers or interface
123
+ vendors to ensure that appropriate updates are provided regularly.
124
+
125
+ If you use one of these binary packages, you must contact the Packager for
126
+ support or for newer binary versions.
127
+ The OpenOCD developers do not provide direct support for packaged binaries.
128
+
129
+ ## A Note to OpenOCD Packagers
130
+
131
+ You are a PACKAGER of OpenOCD if you:
132
+
133
+ - Sell dongles and include pre-built binaries;
134
+ - Supply tools or IDEs (a development solution integrating OpenOCD);
135
+ - Build packages (e.g. RPM or DEB files for a GNU/Linux distribution).
136
+
137
+ As a PACKAGER, you will experience first reports of most issues.
138
+ When you fix those problems for your users, your solution may help
139
+ prevent hundreds (if not thousands) of other questions from other users.
140
+
141
+ If something does not work for you, please work to inform the OpenOCD
142
+ developers know how to improve the system or documentation to avoid
143
+ future problems, and follow-up to help us ensure the issue will be fully
144
+ resolved in our future releases.
145
+
146
+ That said, the OpenOCD developers would also like you to follow a few
147
+ suggestions:
148
+
149
+ - Send patches, including config files, upstream, participate in the
150
+ discussions;
151
+ - Enable all the options OpenOCD supports, even those unrelated to your
152
+ particular hardware;
153
+ - Use "ftdi" interface adapter driver for the FTDI-based devices.
154
+
155
+ ## OpenOCD Documentation
156
+
157
+ In addition to the in-tree documentation, the latest manuals may be
158
+ viewed online at the following URLs:
159
+
160
+ - OpenOCD User's Guide: <http://openocd.org/doc/html/index.html>
161
+
162
+ - OpenOCD Developer's Manual: <http://openocd.org/doc/doxygen/html/index.html>
163
+
164
+ These reflect the latest development versions, so the following section
165
+ introduces how to build the complete documentation from the package.
166
+
167
+ For more information, refer to these documents or contact the developers
168
+ by subscribing to the OpenOCD developer mailing list: openocd-devel@lists.sourceforge.net
169
+
170
+ ### Building the OpenOCD Documentation
171
+
172
+ By default the OpenOCD build process prepares documentation in the
173
+ "Info format" and installs it the standard way, so that `info openocd`
174
+ can access it.
175
+
176
+ Additionally, the OpenOCD User's Guide can be produced in the
177
+ following different formats:
178
+
179
+ If `PDFVIEWER` is set, this creates and views the PDF User Guide.
180
+
181
+ ```sh
182
+ make pdf && ${PDFVIEWER} doc/openocd.pdf
183
+ ```
184
+
185
+ If `HTMLVIEWER` is set, this creates and views the HTML User Guide.
186
+
187
+ ```sh
188
+ make html && ${HTMLVIEWER} doc/openocd.html/index.html
189
+ ```
190
+
191
+ The OpenOCD Developer Manual contains information about the internal
192
+ architecture and other details about the code:
193
+
194
+ Note: make sure doxygen is installed, type doxygen --version
195
+
196
+ ```sh
197
+ make doxygen && ${HTMLVIEWER} doxygen/index.html
198
+ ```
199
+
200
+ ## Supported hardware
201
+
202
+ ### JTAG adapters
203
+
204
+ AM335x, ARM-JTAG-EW, ARM-USB-OCD, ARM-USB-TINY, AT91RM9200, axm0432, BCM2835,
205
+ Bus Blaster, Buspirate, Cadence DPI, Cadence vdebug, Chameleon, CMSIS-DAP,
206
+ Cortino, Cypress KitProg, DENX, Digilent JTAG-SMT2, DLC 5, DLP-USB1232H,
207
+ embedded projects, Espressif USB JTAG Programmer,
208
+ eStick, FlashLINK, FlossJTAG, Flyswatter, Flyswatter2,
209
+ FTDI FT232R, Gateworks, Hoegl, ICDI, ICEBear, J-Link, JTAG VPI, JTAGkey,
210
+ JTAGkey2, JTAG-lock-pick, KT-Link, Linux GPIOD, Lisa/L, LPC1768-Stick,
211
+ Mellanox rshim, MiniModule, NGX, Nuvoton Nu-Link, Nu-Link2, NXHX, NXP IMX GPIO,
212
+ OOCDLink, Opendous, OpenJTAG, Openmoko, OpenRD, OSBDM, Presto, Redbee,
213
+ Remote Bitbang, RLink, SheevaPlug devkit, Stellaris evkits,
214
+ ST-LINK (SWO tracing supported), STM32-PerformanceStick, STR9-comStick,
215
+ sysfsgpio, Tigard, TI XDS110, TUMPA, Turtelizer, ULINK, USB-A9260, USB-Blaster,
216
+ USB-JTAG, USBprog, VPACLink, VSLLink, Wiggler, XDS100v2, Xilinx XVC/PCIe,
217
+ Xverve.
218
+
219
+ ### Debug targets
220
+
221
+ ARM: AArch64, ARM11, ARM7, ARM9, Cortex-A/R (v7-A/R), Cortex-M (ARMv{6/7/8}-M),
222
+ FA526, Feroceon/Dragonite, XScale.
223
+ ARCv2, AVR32, DSP563xx, DSP5680xx, EnSilica eSi-RISC, EJTAG (MIPS32, MIPS64),
224
+ ESP32, ESP32-S2, ESP32-S3, Intel Quark, LS102x-SAP, RISC-V, ST STM8,
225
+ Xtensa.
226
+
227
+ ### Flash drivers
228
+
229
+ ADUC702x, AT91SAM, AT91SAM9 (NAND), ATH79, ATmega128RFA1, Atmel SAM, AVR, CFI,
230
+ DSP5680xx, EFM32, EM357, eSi-RISC, eSi-TSMC, EZR32HG, FM3, FM4, Freedom E SPI,
231
+ GD32, i.MX31, Kinetis, LPC8xx/LPC1xxx/LPC2xxx/LPC541xx, LPC2900, LPC3180, LPC32xx,
232
+ LPCSPIFI, Marvell QSPI, MAX32, Milandr, MXC, NIIET, nRF51, nRF52 , NuMicro,
233
+ NUC910, Nuvoton NPCX, onsemi RSL10, Orion/Kirkwood, PIC32mx, PSoC4/5LP/6,
234
+ Raspberry RP2040, Renesas RPC HF and SH QSPI,
235
+ S3C24xx, S3C6400, SiM3x, SiFive Freedom E, Stellaris, ST BlueNRG, STM32,
236
+ STM32 QUAD/OCTO-SPI for Flash/FRAM/EEPROM, STMSMI, STR7x, STR9x, SWM050,
237
+ TI CC13xx, TI CC26xx, TI CC32xx, TI MSP432, Winner Micro w600, Xilinx XCF,
238
+ XMC1xxx, XMC4xxx.
239
+
240
+ ## Building OpenOCD
241
+
242
+ The INSTALL file contains generic instructions for running `configure`
243
+ and compiling the OpenOCD source code. That file is provided by
244
+ default for all GNU autotools packages. If you are not familiar with
245
+ the GNU autotools, then you should read those instructions first.
246
+
247
+ Note: if the INSTALL file is not present, it means you are using the
248
+ source code from a development branch, not from an OpenOCD release.
249
+ In this case, follow the instructions 'Compiling OpenOCD' below and
250
+ the file will be created by the first command `./bootstrap`.
251
+
252
+ The remainder of this document tries to provide some instructions for
253
+ those looking for a quick-install.
254
+
255
+ ### OpenOCD Dependencies
256
+
257
+ GCC or Clang is currently required to build OpenOCD. The developers
258
+ have begun to enforce strict code warnings (-Wall, -Werror, -Wextra,
259
+ and more) and use C99-specific features: inline functions, named
260
+ initializers, mixing declarations with code, and other tricks. While
261
+ it may be possible to use other compilers, they must be somewhat
262
+ modern and could require extending support to conditionally remove
263
+ GCC-specific extensions.
264
+
265
+ You'll also need:
266
+
267
+ - make
268
+ - libtool
269
+ - pkg-config >= 0.23 or pkgconf
270
+ - libjim >= 0.79
271
+
272
+ Additionally, for building from Git:
273
+
274
+ - autoconf >= 2.69
275
+ - automake >= 1.14
276
+ - texinfo >= 5.0
277
+
278
+ Optional USB-based adapter drivers need libusb-1.0.
279
+
280
+ Optional USB-Blaster, ASIX Presto and OpenJTAG interface adapter drivers need
281
+ [libftdi](http://www.intra2net.com/en/developer/libftdi/index.php) library.
282
+
283
+ Optional CMSIS-DAP adapter driver needs HIDAPI library.
284
+
285
+ Optional linuxgpiod adapter driver needs libgpiod library.
286
+
287
+ Optional J-Link adapter driver needs libjaylink library.
288
+
289
+ Optional ARM disassembly needs capstone library.
290
+
291
+ Optional development script checkpatch needs:
292
+
293
+ - perl
294
+ - python
295
+ - python-ply
296
+ - pymarkdownlnt
297
+
298
+ ### Compiling OpenOCD
299
+
300
+ To build OpenOCD, use the following sequence of commands:
301
+
302
+ ```sh
303
+ ./bootstrap
304
+ ./configure [options]
305
+ make
306
+ sudo make install
307
+ ```
308
+
309
+ The `bootstrap` command is only necessary when building from the Git repository.
310
+ The `configure` step generates the Makefiles required to build OpenOCD, usually
311
+ with one or more options provided to it.
312
+ The first 'make' step will build OpenOCD and place the final executable in './src/'.
313
+ The final (optional) step, `make install`, places all of the files in the
314
+ required location.
315
+
316
+ To see the list of all the supported options, run `./configure --help`
317
+
318
+ ### Cross-compiling Options
319
+
320
+ Cross-compiling is supported the standard autotools way, you just need
321
+ to specify the cross-compiling target triplet in the --host option,
322
+ e.g. for cross-building for Windows 32-bit with MinGW on Debian:
323
+
324
+ ```sh
325
+ ./configure --host=i686-w64-mingw32 [options]
326
+ ```
327
+
328
+ To make pkg-config work nicely for cross-compiling, you might need an additional
329
+ wrapper script as described at <https://autotools.io/pkgconfig/cross-compiling.html>.
330
+
331
+ This is needed to tell pkg-config where to look for the target
332
+ libraries that OpenOCD depends on. Alternatively, you can specify
333
+ `*_CFLAGS` and `*_LIBS` environment variables directly, see `./configure
334
+ --help` for the details.
335
+
336
+ For a more or less complete script that does all this for you, see `contrib/cross-build.sh`.
337
+
338
+ ### Parallel Port Dongles
339
+
340
+ If you want to access the parallel port using the PPDEV interface you
341
+ have to specify both `--enable-parport` and `--enable-parport-ppdev`, since
342
+ the later option is an option to the parport driver.
343
+
344
+ The same is true for the `--enable-parport-giveio` option, you have to
345
+ use both the `--enable-parport` and the `--enable-parport-giveio` option
346
+ if you want to use giveio instead of ioperm parallel port access
347
+ method.
348
+
349
+ ### Obtaining OpenOCD From Git
350
+
351
+ You can download the current Git version with a Git client of your
352
+ choice from the main repository: `git://git.code.sf.net/p/openocd/code`
353
+
354
+ You may prefer to use a mirror:
355
+
356
+ - <http://repo.or.cz/r/openocd.git>
357
+ - git://repo.or.cz/openocd.git
358
+
359
+ Using the Git command line client, you might use the following command
360
+ to set up a local copy of the current repository (make sure there is no
361
+ directory called "openocd" in the current directory):
362
+
363
+ ```sh
364
+ git clone git://git.code.sf.net/p/openocd/code openocd
365
+ ```
366
+
367
+ Then you can update that at your convenience using `git pull`.
368
+
369
+ There is also a gitweb interface, which you can use either to browse the
370
+ repository or to download arbitrary snapshots using HTTP: <http://repo.or.cz/w/openocd.git>.
371
+
372
+ Snapshots are compressed tarballs of the source tree, about 1.3 MBytes
373
+ each at this writing.
374
+
375
+ ## Permissions delegation
376
+
377
+ Running OpenOCD with root/administrative permissions is strongly
378
+ discouraged for security reasons.
379
+
380
+ For USB devices on GNU/Linux you should use the contrib/60-openocd.rules
381
+ file. It probably belongs somewhere in /etc/udev/rules.d, but
382
+ consult your operating system documentation to be sure. Do not forget
383
+ to add yourself to the "plugdev" group.
384
+
385
+ For parallel port adapters on GNU/Linux and FreeBSD please change your
386
+ "ppdev" (parport* or ppi*) device node permissions accordingly.
387
+
388
+ For parport adapters on Windows you need to run install_giveio.bat
389
+ (it's also possible to use "ioperm" with Cygwin instead) to give
390
+ ordinary users permissions for accessing the "LPT" registers directly.
@@ -0,0 +1,359 @@
1
+ # Welcome to OpenOCD
2
+
3
+ OpenOCD provides on-chip programming and debugging support with a
4
+ layered architecture of JTAG interface and TAP support including:
5
+
6
+ - (X)SVF playback to facilitate automated boundary scan and FPGA/CPLD
7
+ programming;
8
+ - debug target support (e.g. ARM, MIPS): single-stepping,
9
+ breakpoints/watchpoints, gprof profiling, etc;
10
+ - flash chip drivers (e.g. CFI, NAND, internal flash);
11
+ - embedded Tcl interpreter for easy scripting.
12
+
13
+ Several network interfaces are available for interacting with OpenOCD:
14
+ telnet, Tcl, and GDB. The GDB server enables OpenOCD to function as a
15
+ "remote target" for source-level debugging of embedded systems using
16
+ the GNU GDB program (and the others who talk GDB protocol, e.g. IDA
17
+ Pro).
18
+
19
+ This README file contains an overview of the following topics:
20
+
21
+ - quickstart instructions,
22
+ - how to find and build more OpenOCD documentation,
23
+ - list of the supported hardware,
24
+ - the installation and build process,
25
+ - packaging tips.
26
+
27
+ ## Quickstart for the impatient
28
+
29
+ If you have a popular board then just start OpenOCD with its config,
30
+ e.g.:
31
+
32
+ ```sh
33
+ openocd -f board/stm32f4discovery.cfg
34
+ ```
35
+
36
+ If you are connecting a particular adapter with some specific target,
37
+ you need to source both the jtag interface and the target configs,
38
+ e.g.:
39
+
40
+ ```sh
41
+ openocd -f interface/ftdi/jtagkey2.cfg -c "transport select jtag" \
42
+ -f target/ti/calypso.cfg
43
+ ```
44
+
45
+ ```sh
46
+ openocd -f interface/stlink.cfg -c "transport select swd" \
47
+ -f target/stm32l0.cfg
48
+ ```
49
+
50
+ After OpenOCD startup, connect GDB with
51
+
52
+ ```gdb
53
+ (gdb) target extended-remote localhost:3333
54
+ ```
55
+
56
+ ## Installing OpenOCD
57
+
58
+ The easiest way to install OpenOCD is through your operating system's package
59
+ manager.
60
+
61
+ - Debian / Ubuntu
62
+
63
+ ```sh
64
+ sudo apt install openocd
65
+ ```
66
+
67
+ - Fedora
68
+
69
+ ```sh
70
+ sudo dnf install openocd
71
+ ```
72
+
73
+ - macOS (via Homebrew)
74
+
75
+ ```sh
76
+ brew install open-ocd
77
+ ```
78
+
79
+ - Windows (via MSYS2)
80
+
81
+ ```sh
82
+ pacman -S mingw-w64-x86_64-openocd
83
+ ```
84
+
85
+ These packages are often more stable than the bleeding-edge Git mainline, where
86
+ active development happens.
87
+ "Packagers" create binary releases of OpenOCD after the developers publish new
88
+ source code releases.
89
+ Older OpenOCD versions are not suitable for diagnosing issues in the current
90
+ release.
91
+ Users should stay in touch with their distribution maintainers or interface
92
+ vendors to ensure that appropriate updates are provided regularly.
93
+
94
+ If you use one of these binary packages, you must contact the Packager for
95
+ support or for newer binary versions.
96
+ The OpenOCD developers do not provide direct support for packaged binaries.
97
+
98
+ ## A Note to OpenOCD Packagers
99
+
100
+ You are a PACKAGER of OpenOCD if you:
101
+
102
+ - Sell dongles and include pre-built binaries;
103
+ - Supply tools or IDEs (a development solution integrating OpenOCD);
104
+ - Build packages (e.g. RPM or DEB files for a GNU/Linux distribution).
105
+
106
+ As a PACKAGER, you will experience first reports of most issues.
107
+ When you fix those problems for your users, your solution may help
108
+ prevent hundreds (if not thousands) of other questions from other users.
109
+
110
+ If something does not work for you, please work to inform the OpenOCD
111
+ developers know how to improve the system or documentation to avoid
112
+ future problems, and follow-up to help us ensure the issue will be fully
113
+ resolved in our future releases.
114
+
115
+ That said, the OpenOCD developers would also like you to follow a few
116
+ suggestions:
117
+
118
+ - Send patches, including config files, upstream, participate in the
119
+ discussions;
120
+ - Enable all the options OpenOCD supports, even those unrelated to your
121
+ particular hardware;
122
+ - Use "ftdi" interface adapter driver for the FTDI-based devices.
123
+
124
+ ## OpenOCD Documentation
125
+
126
+ In addition to the in-tree documentation, the latest manuals may be
127
+ viewed online at the following URLs:
128
+
129
+ - OpenOCD User's Guide: <http://openocd.org/doc/html/index.html>
130
+
131
+ - OpenOCD Developer's Manual: <http://openocd.org/doc/doxygen/html/index.html>
132
+
133
+ These reflect the latest development versions, so the following section
134
+ introduces how to build the complete documentation from the package.
135
+
136
+ For more information, refer to these documents or contact the developers
137
+ by subscribing to the OpenOCD developer mailing list: openocd-devel@lists.sourceforge.net
138
+
139
+ ### Building the OpenOCD Documentation
140
+
141
+ By default the OpenOCD build process prepares documentation in the
142
+ "Info format" and installs it the standard way, so that `info openocd`
143
+ can access it.
144
+
145
+ Additionally, the OpenOCD User's Guide can be produced in the
146
+ following different formats:
147
+
148
+ If `PDFVIEWER` is set, this creates and views the PDF User Guide.
149
+
150
+ ```sh
151
+ make pdf && ${PDFVIEWER} doc/openocd.pdf
152
+ ```
153
+
154
+ If `HTMLVIEWER` is set, this creates and views the HTML User Guide.
155
+
156
+ ```sh
157
+ make html && ${HTMLVIEWER} doc/openocd.html/index.html
158
+ ```
159
+
160
+ The OpenOCD Developer Manual contains information about the internal
161
+ architecture and other details about the code:
162
+
163
+ Note: make sure doxygen is installed, type doxygen --version
164
+
165
+ ```sh
166
+ make doxygen && ${HTMLVIEWER} doxygen/index.html
167
+ ```
168
+
169
+ ## Supported hardware
170
+
171
+ ### JTAG adapters
172
+
173
+ AM335x, ARM-JTAG-EW, ARM-USB-OCD, ARM-USB-TINY, AT91RM9200, axm0432, BCM2835,
174
+ Bus Blaster, Buspirate, Cadence DPI, Cadence vdebug, Chameleon, CMSIS-DAP,
175
+ Cortino, Cypress KitProg, DENX, Digilent JTAG-SMT2, DLC 5, DLP-USB1232H,
176
+ embedded projects, Espressif USB JTAG Programmer,
177
+ eStick, FlashLINK, FlossJTAG, Flyswatter, Flyswatter2,
178
+ FTDI FT232R, Gateworks, Hoegl, ICDI, ICEBear, J-Link, JTAG VPI, JTAGkey,
179
+ JTAGkey2, JTAG-lock-pick, KT-Link, Linux GPIOD, Lisa/L, LPC1768-Stick,
180
+ Mellanox rshim, MiniModule, NGX, Nuvoton Nu-Link, Nu-Link2, NXHX, NXP IMX GPIO,
181
+ OOCDLink, Opendous, OpenJTAG, Openmoko, OpenRD, OSBDM, Presto, Redbee,
182
+ Remote Bitbang, RLink, SheevaPlug devkit, Stellaris evkits,
183
+ ST-LINK (SWO tracing supported), STM32-PerformanceStick, STR9-comStick,
184
+ sysfsgpio, Tigard, TI XDS110, TUMPA, Turtelizer, ULINK, USB-A9260, USB-Blaster,
185
+ USB-JTAG, USBprog, VPACLink, VSLLink, Wiggler, XDS100v2, Xilinx XVC/PCIe,
186
+ Xverve.
187
+
188
+ ### Debug targets
189
+
190
+ ARM: AArch64, ARM11, ARM7, ARM9, Cortex-A/R (v7-A/R), Cortex-M (ARMv{6/7/8}-M),
191
+ FA526, Feroceon/Dragonite, XScale.
192
+ ARCv2, AVR32, DSP563xx, DSP5680xx, EnSilica eSi-RISC, EJTAG (MIPS32, MIPS64),
193
+ ESP32, ESP32-S2, ESP32-S3, Intel Quark, LS102x-SAP, RISC-V, ST STM8,
194
+ Xtensa.
195
+
196
+ ### Flash drivers
197
+
198
+ ADUC702x, AT91SAM, AT91SAM9 (NAND), ATH79, ATmega128RFA1, Atmel SAM, AVR, CFI,
199
+ DSP5680xx, EFM32, EM357, eSi-RISC, eSi-TSMC, EZR32HG, FM3, FM4, Freedom E SPI,
200
+ GD32, i.MX31, Kinetis, LPC8xx/LPC1xxx/LPC2xxx/LPC541xx, LPC2900, LPC3180, LPC32xx,
201
+ LPCSPIFI, Marvell QSPI, MAX32, Milandr, MXC, NIIET, nRF51, nRF52 , NuMicro,
202
+ NUC910, Nuvoton NPCX, onsemi RSL10, Orion/Kirkwood, PIC32mx, PSoC4/5LP/6,
203
+ Raspberry RP2040, Renesas RPC HF and SH QSPI,
204
+ S3C24xx, S3C6400, SiM3x, SiFive Freedom E, Stellaris, ST BlueNRG, STM32,
205
+ STM32 QUAD/OCTO-SPI for Flash/FRAM/EEPROM, STMSMI, STR7x, STR9x, SWM050,
206
+ TI CC13xx, TI CC26xx, TI CC32xx, TI MSP432, Winner Micro w600, Xilinx XCF,
207
+ XMC1xxx, XMC4xxx.
208
+
209
+ ## Building OpenOCD
210
+
211
+ The INSTALL file contains generic instructions for running `configure`
212
+ and compiling the OpenOCD source code. That file is provided by
213
+ default for all GNU autotools packages. If you are not familiar with
214
+ the GNU autotools, then you should read those instructions first.
215
+
216
+ Note: if the INSTALL file is not present, it means you are using the
217
+ source code from a development branch, not from an OpenOCD release.
218
+ In this case, follow the instructions 'Compiling OpenOCD' below and
219
+ the file will be created by the first command `./bootstrap`.
220
+
221
+ The remainder of this document tries to provide some instructions for
222
+ those looking for a quick-install.
223
+
224
+ ### OpenOCD Dependencies
225
+
226
+ GCC or Clang is currently required to build OpenOCD. The developers
227
+ have begun to enforce strict code warnings (-Wall, -Werror, -Wextra,
228
+ and more) and use C99-specific features: inline functions, named
229
+ initializers, mixing declarations with code, and other tricks. While
230
+ it may be possible to use other compilers, they must be somewhat
231
+ modern and could require extending support to conditionally remove
232
+ GCC-specific extensions.
233
+
234
+ You'll also need:
235
+
236
+ - make
237
+ - libtool
238
+ - pkg-config >= 0.23 or pkgconf
239
+ - libjim >= 0.79
240
+
241
+ Additionally, for building from Git:
242
+
243
+ - autoconf >= 2.69
244
+ - automake >= 1.14
245
+ - texinfo >= 5.0
246
+
247
+ Optional USB-based adapter drivers need libusb-1.0.
248
+
249
+ Optional USB-Blaster, ASIX Presto and OpenJTAG interface adapter drivers need
250
+ [libftdi](http://www.intra2net.com/en/developer/libftdi/index.php) library.
251
+
252
+ Optional CMSIS-DAP adapter driver needs HIDAPI library.
253
+
254
+ Optional linuxgpiod adapter driver needs libgpiod library.
255
+
256
+ Optional J-Link adapter driver needs libjaylink library.
257
+
258
+ Optional ARM disassembly needs capstone library.
259
+
260
+ Optional development script checkpatch needs:
261
+
262
+ - perl
263
+ - python
264
+ - python-ply
265
+ - pymarkdownlnt
266
+
267
+ ### Compiling OpenOCD
268
+
269
+ To build OpenOCD, use the following sequence of commands:
270
+
271
+ ```sh
272
+ ./bootstrap
273
+ ./configure [options]
274
+ make
275
+ sudo make install
276
+ ```
277
+
278
+ The `bootstrap` command is only necessary when building from the Git repository.
279
+ The `configure` step generates the Makefiles required to build OpenOCD, usually
280
+ with one or more options provided to it.
281
+ The first 'make' step will build OpenOCD and place the final executable in './src/'.
282
+ The final (optional) step, `make install`, places all of the files in the
283
+ required location.
284
+
285
+ To see the list of all the supported options, run `./configure --help`
286
+
287
+ ### Cross-compiling Options
288
+
289
+ Cross-compiling is supported the standard autotools way, you just need
290
+ to specify the cross-compiling target triplet in the --host option,
291
+ e.g. for cross-building for Windows 32-bit with MinGW on Debian:
292
+
293
+ ```sh
294
+ ./configure --host=i686-w64-mingw32 [options]
295
+ ```
296
+
297
+ To make pkg-config work nicely for cross-compiling, you might need an additional
298
+ wrapper script as described at <https://autotools.io/pkgconfig/cross-compiling.html>.
299
+
300
+ This is needed to tell pkg-config where to look for the target
301
+ libraries that OpenOCD depends on. Alternatively, you can specify
302
+ `*_CFLAGS` and `*_LIBS` environment variables directly, see `./configure
303
+ --help` for the details.
304
+
305
+ For a more or less complete script that does all this for you, see `contrib/cross-build.sh`.
306
+
307
+ ### Parallel Port Dongles
308
+
309
+ If you want to access the parallel port using the PPDEV interface you
310
+ have to specify both `--enable-parport` and `--enable-parport-ppdev`, since
311
+ the later option is an option to the parport driver.
312
+
313
+ The same is true for the `--enable-parport-giveio` option, you have to
314
+ use both the `--enable-parport` and the `--enable-parport-giveio` option
315
+ if you want to use giveio instead of ioperm parallel port access
316
+ method.
317
+
318
+ ### Obtaining OpenOCD From Git
319
+
320
+ You can download the current Git version with a Git client of your
321
+ choice from the main repository: `git://git.code.sf.net/p/openocd/code`
322
+
323
+ You may prefer to use a mirror:
324
+
325
+ - <http://repo.or.cz/r/openocd.git>
326
+ - git://repo.or.cz/openocd.git
327
+
328
+ Using the Git command line client, you might use the following command
329
+ to set up a local copy of the current repository (make sure there is no
330
+ directory called "openocd" in the current directory):
331
+
332
+ ```sh
333
+ git clone git://git.code.sf.net/p/openocd/code openocd
334
+ ```
335
+
336
+ Then you can update that at your convenience using `git pull`.
337
+
338
+ There is also a gitweb interface, which you can use either to browse the
339
+ repository or to download arbitrary snapshots using HTTP: <http://repo.or.cz/w/openocd.git>.
340
+
341
+ Snapshots are compressed tarballs of the source tree, about 1.3 MBytes
342
+ each at this writing.
343
+
344
+ ## Permissions delegation
345
+
346
+ Running OpenOCD with root/administrative permissions is strongly
347
+ discouraged for security reasons.
348
+
349
+ For USB devices on GNU/Linux you should use the contrib/60-openocd.rules
350
+ file. It probably belongs somewhere in /etc/udev/rules.d, but
351
+ consult your operating system documentation to be sure. Do not forget
352
+ to add yourself to the "plugdev" group.
353
+
354
+ For parallel port adapters on GNU/Linux and FreeBSD please change your
355
+ "ppdev" (parport* or ppi*) device node permissions accordingly.
356
+
357
+ For parport adapters on Windows you need to run install_giveio.bat
358
+ (it's also possible to use "ioperm" with Cygwin instead) to give
359
+ ordinary users permissions for accessing the "LPT" registers directly.
@@ -0,0 +1,58 @@
1
+ # SPDX-License-Identifier: GPL-2.0-or-later
2
+
3
+ """OpenOCD for Espressif chips."""
4
+
5
+ import os
6
+ import subprocess
7
+ import sys
8
+ from pathlib import Path
9
+
10
+ try:
11
+ from openocd_esp32._version import __version__
12
+ except ImportError:
13
+ __version__ = "0.0.0.dev0"
14
+
15
+
16
+ def get_openocd_path() -> Path:
17
+ """Return path to the openocd binary."""
18
+ pkg_dir = Path(__file__).parent
19
+ if sys.platform == "win32":
20
+ return pkg_dir / "bin" / "openocd.exe"
21
+ return pkg_dir / "bin" / "openocd"
22
+
23
+
24
+ def get_scripts_path() -> Path:
25
+ """Return path to the OpenOCD scripts directory."""
26
+ return Path(__file__).parent / "share" / "openocd" / "scripts"
27
+
28
+
29
+ def main() -> None:
30
+ """Run openocd with the bundled scripts path.
31
+
32
+ On POSIX, replaces the current process via os.execv and does not return.
33
+ On Windows, runs openocd as a subprocess and exits with its return code.
34
+ """
35
+ openocd = get_openocd_path()
36
+ scripts = get_scripts_path()
37
+
38
+ if not openocd.exists():
39
+ print(
40
+ f"Error: OpenOCD binary not found at {openocd}.\n"
41
+ "This installation appears to be incomplete. "
42
+ "Reinstall the platform-specific wheel from PyPI.",
43
+ file=sys.stderr,
44
+ )
45
+ sys.exit(1)
46
+
47
+ args = [str(openocd), "-s", str(scripts), *sys.argv[1:]]
48
+
49
+ sys.stdout.flush()
50
+ sys.stderr.flush()
51
+
52
+ if sys.platform == "win32":
53
+ try:
54
+ sys.exit(subprocess.run(args).returncode)
55
+ except KeyboardInterrupt:
56
+ sys.exit(130)
57
+
58
+ os.execv(args[0], args)
@@ -0,0 +1,7 @@
1
+ # SPDX-License-Identifier: GPL-2.0-or-later
2
+
3
+ """Allow running as python -m openocd_esp32."""
4
+
5
+ from openocd_esp32 import main
6
+
7
+ main()
@@ -0,0 +1,5 @@
1
+ # SPDX-License-Identifier: GPL-2.0-or-later
2
+
3
+ """Package version. Overwritten by tools/build_wheel.py at release time."""
4
+
5
+ __version__ = "0.0.0.dev0"
@@ -0,0 +1,390 @@
1
+ Metadata-Version: 2.4
2
+ Name: openocd-esp32
3
+ Version: 0.0.0.dev0
4
+ Summary: OpenOCD for Espressif chips (ESP32, ESP32-S2, ESP32-S3, ESP32-C3, etc.)
5
+ Author: Espressif Systems
6
+ License: GPL-2.0-or-later
7
+ Project-URL: Homepage, https://github.com/espressif/openocd-esp32
8
+ Project-URL: Documentation, https://docs.espressif.com/projects/openocd-esp32
9
+ Project-URL: Repository, https://github.com/espressif/openocd-esp32
10
+ Project-URL: Issues, https://github.com/espressif/openocd-esp32/issues
11
+ Keywords: openocd,esp32,espressif,debugger,jtag,embedded
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
16
+ Classifier: Operating System :: MacOS :: MacOS X
17
+ Classifier: Operating System :: Microsoft :: Windows
18
+ Classifier: Operating System :: POSIX :: Linux
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Topic :: Software Development :: Debuggers
26
+ Classifier: Topic :: Software Development :: Embedded Systems
27
+ Requires-Python: >=3.9
28
+ Description-Content-Type: text/markdown
29
+ License-File: COPYING
30
+ Dynamic: license-file
31
+
32
+ # Welcome to OpenOCD
33
+
34
+ OpenOCD provides on-chip programming and debugging support with a
35
+ layered architecture of JTAG interface and TAP support including:
36
+
37
+ - (X)SVF playback to facilitate automated boundary scan and FPGA/CPLD
38
+ programming;
39
+ - debug target support (e.g. ARM, MIPS): single-stepping,
40
+ breakpoints/watchpoints, gprof profiling, etc;
41
+ - flash chip drivers (e.g. CFI, NAND, internal flash);
42
+ - embedded Tcl interpreter for easy scripting.
43
+
44
+ Several network interfaces are available for interacting with OpenOCD:
45
+ telnet, Tcl, and GDB. The GDB server enables OpenOCD to function as a
46
+ "remote target" for source-level debugging of embedded systems using
47
+ the GNU GDB program (and the others who talk GDB protocol, e.g. IDA
48
+ Pro).
49
+
50
+ This README file contains an overview of the following topics:
51
+
52
+ - quickstart instructions,
53
+ - how to find and build more OpenOCD documentation,
54
+ - list of the supported hardware,
55
+ - the installation and build process,
56
+ - packaging tips.
57
+
58
+ ## Quickstart for the impatient
59
+
60
+ If you have a popular board then just start OpenOCD with its config,
61
+ e.g.:
62
+
63
+ ```sh
64
+ openocd -f board/stm32f4discovery.cfg
65
+ ```
66
+
67
+ If you are connecting a particular adapter with some specific target,
68
+ you need to source both the jtag interface and the target configs,
69
+ e.g.:
70
+
71
+ ```sh
72
+ openocd -f interface/ftdi/jtagkey2.cfg -c "transport select jtag" \
73
+ -f target/ti/calypso.cfg
74
+ ```
75
+
76
+ ```sh
77
+ openocd -f interface/stlink.cfg -c "transport select swd" \
78
+ -f target/stm32l0.cfg
79
+ ```
80
+
81
+ After OpenOCD startup, connect GDB with
82
+
83
+ ```gdb
84
+ (gdb) target extended-remote localhost:3333
85
+ ```
86
+
87
+ ## Installing OpenOCD
88
+
89
+ The easiest way to install OpenOCD is through your operating system's package
90
+ manager.
91
+
92
+ - Debian / Ubuntu
93
+
94
+ ```sh
95
+ sudo apt install openocd
96
+ ```
97
+
98
+ - Fedora
99
+
100
+ ```sh
101
+ sudo dnf install openocd
102
+ ```
103
+
104
+ - macOS (via Homebrew)
105
+
106
+ ```sh
107
+ brew install open-ocd
108
+ ```
109
+
110
+ - Windows (via MSYS2)
111
+
112
+ ```sh
113
+ pacman -S mingw-w64-x86_64-openocd
114
+ ```
115
+
116
+ These packages are often more stable than the bleeding-edge Git mainline, where
117
+ active development happens.
118
+ "Packagers" create binary releases of OpenOCD after the developers publish new
119
+ source code releases.
120
+ Older OpenOCD versions are not suitable for diagnosing issues in the current
121
+ release.
122
+ Users should stay in touch with their distribution maintainers or interface
123
+ vendors to ensure that appropriate updates are provided regularly.
124
+
125
+ If you use one of these binary packages, you must contact the Packager for
126
+ support or for newer binary versions.
127
+ The OpenOCD developers do not provide direct support for packaged binaries.
128
+
129
+ ## A Note to OpenOCD Packagers
130
+
131
+ You are a PACKAGER of OpenOCD if you:
132
+
133
+ - Sell dongles and include pre-built binaries;
134
+ - Supply tools or IDEs (a development solution integrating OpenOCD);
135
+ - Build packages (e.g. RPM or DEB files for a GNU/Linux distribution).
136
+
137
+ As a PACKAGER, you will experience first reports of most issues.
138
+ When you fix those problems for your users, your solution may help
139
+ prevent hundreds (if not thousands) of other questions from other users.
140
+
141
+ If something does not work for you, please work to inform the OpenOCD
142
+ developers know how to improve the system or documentation to avoid
143
+ future problems, and follow-up to help us ensure the issue will be fully
144
+ resolved in our future releases.
145
+
146
+ That said, the OpenOCD developers would also like you to follow a few
147
+ suggestions:
148
+
149
+ - Send patches, including config files, upstream, participate in the
150
+ discussions;
151
+ - Enable all the options OpenOCD supports, even those unrelated to your
152
+ particular hardware;
153
+ - Use "ftdi" interface adapter driver for the FTDI-based devices.
154
+
155
+ ## OpenOCD Documentation
156
+
157
+ In addition to the in-tree documentation, the latest manuals may be
158
+ viewed online at the following URLs:
159
+
160
+ - OpenOCD User's Guide: <http://openocd.org/doc/html/index.html>
161
+
162
+ - OpenOCD Developer's Manual: <http://openocd.org/doc/doxygen/html/index.html>
163
+
164
+ These reflect the latest development versions, so the following section
165
+ introduces how to build the complete documentation from the package.
166
+
167
+ For more information, refer to these documents or contact the developers
168
+ by subscribing to the OpenOCD developer mailing list: openocd-devel@lists.sourceforge.net
169
+
170
+ ### Building the OpenOCD Documentation
171
+
172
+ By default the OpenOCD build process prepares documentation in the
173
+ "Info format" and installs it the standard way, so that `info openocd`
174
+ can access it.
175
+
176
+ Additionally, the OpenOCD User's Guide can be produced in the
177
+ following different formats:
178
+
179
+ If `PDFVIEWER` is set, this creates and views the PDF User Guide.
180
+
181
+ ```sh
182
+ make pdf && ${PDFVIEWER} doc/openocd.pdf
183
+ ```
184
+
185
+ If `HTMLVIEWER` is set, this creates and views the HTML User Guide.
186
+
187
+ ```sh
188
+ make html && ${HTMLVIEWER} doc/openocd.html/index.html
189
+ ```
190
+
191
+ The OpenOCD Developer Manual contains information about the internal
192
+ architecture and other details about the code:
193
+
194
+ Note: make sure doxygen is installed, type doxygen --version
195
+
196
+ ```sh
197
+ make doxygen && ${HTMLVIEWER} doxygen/index.html
198
+ ```
199
+
200
+ ## Supported hardware
201
+
202
+ ### JTAG adapters
203
+
204
+ AM335x, ARM-JTAG-EW, ARM-USB-OCD, ARM-USB-TINY, AT91RM9200, axm0432, BCM2835,
205
+ Bus Blaster, Buspirate, Cadence DPI, Cadence vdebug, Chameleon, CMSIS-DAP,
206
+ Cortino, Cypress KitProg, DENX, Digilent JTAG-SMT2, DLC 5, DLP-USB1232H,
207
+ embedded projects, Espressif USB JTAG Programmer,
208
+ eStick, FlashLINK, FlossJTAG, Flyswatter, Flyswatter2,
209
+ FTDI FT232R, Gateworks, Hoegl, ICDI, ICEBear, J-Link, JTAG VPI, JTAGkey,
210
+ JTAGkey2, JTAG-lock-pick, KT-Link, Linux GPIOD, Lisa/L, LPC1768-Stick,
211
+ Mellanox rshim, MiniModule, NGX, Nuvoton Nu-Link, Nu-Link2, NXHX, NXP IMX GPIO,
212
+ OOCDLink, Opendous, OpenJTAG, Openmoko, OpenRD, OSBDM, Presto, Redbee,
213
+ Remote Bitbang, RLink, SheevaPlug devkit, Stellaris evkits,
214
+ ST-LINK (SWO tracing supported), STM32-PerformanceStick, STR9-comStick,
215
+ sysfsgpio, Tigard, TI XDS110, TUMPA, Turtelizer, ULINK, USB-A9260, USB-Blaster,
216
+ USB-JTAG, USBprog, VPACLink, VSLLink, Wiggler, XDS100v2, Xilinx XVC/PCIe,
217
+ Xverve.
218
+
219
+ ### Debug targets
220
+
221
+ ARM: AArch64, ARM11, ARM7, ARM9, Cortex-A/R (v7-A/R), Cortex-M (ARMv{6/7/8}-M),
222
+ FA526, Feroceon/Dragonite, XScale.
223
+ ARCv2, AVR32, DSP563xx, DSP5680xx, EnSilica eSi-RISC, EJTAG (MIPS32, MIPS64),
224
+ ESP32, ESP32-S2, ESP32-S3, Intel Quark, LS102x-SAP, RISC-V, ST STM8,
225
+ Xtensa.
226
+
227
+ ### Flash drivers
228
+
229
+ ADUC702x, AT91SAM, AT91SAM9 (NAND), ATH79, ATmega128RFA1, Atmel SAM, AVR, CFI,
230
+ DSP5680xx, EFM32, EM357, eSi-RISC, eSi-TSMC, EZR32HG, FM3, FM4, Freedom E SPI,
231
+ GD32, i.MX31, Kinetis, LPC8xx/LPC1xxx/LPC2xxx/LPC541xx, LPC2900, LPC3180, LPC32xx,
232
+ LPCSPIFI, Marvell QSPI, MAX32, Milandr, MXC, NIIET, nRF51, nRF52 , NuMicro,
233
+ NUC910, Nuvoton NPCX, onsemi RSL10, Orion/Kirkwood, PIC32mx, PSoC4/5LP/6,
234
+ Raspberry RP2040, Renesas RPC HF and SH QSPI,
235
+ S3C24xx, S3C6400, SiM3x, SiFive Freedom E, Stellaris, ST BlueNRG, STM32,
236
+ STM32 QUAD/OCTO-SPI for Flash/FRAM/EEPROM, STMSMI, STR7x, STR9x, SWM050,
237
+ TI CC13xx, TI CC26xx, TI CC32xx, TI MSP432, Winner Micro w600, Xilinx XCF,
238
+ XMC1xxx, XMC4xxx.
239
+
240
+ ## Building OpenOCD
241
+
242
+ The INSTALL file contains generic instructions for running `configure`
243
+ and compiling the OpenOCD source code. That file is provided by
244
+ default for all GNU autotools packages. If you are not familiar with
245
+ the GNU autotools, then you should read those instructions first.
246
+
247
+ Note: if the INSTALL file is not present, it means you are using the
248
+ source code from a development branch, not from an OpenOCD release.
249
+ In this case, follow the instructions 'Compiling OpenOCD' below and
250
+ the file will be created by the first command `./bootstrap`.
251
+
252
+ The remainder of this document tries to provide some instructions for
253
+ those looking for a quick-install.
254
+
255
+ ### OpenOCD Dependencies
256
+
257
+ GCC or Clang is currently required to build OpenOCD. The developers
258
+ have begun to enforce strict code warnings (-Wall, -Werror, -Wextra,
259
+ and more) and use C99-specific features: inline functions, named
260
+ initializers, mixing declarations with code, and other tricks. While
261
+ it may be possible to use other compilers, they must be somewhat
262
+ modern and could require extending support to conditionally remove
263
+ GCC-specific extensions.
264
+
265
+ You'll also need:
266
+
267
+ - make
268
+ - libtool
269
+ - pkg-config >= 0.23 or pkgconf
270
+ - libjim >= 0.79
271
+
272
+ Additionally, for building from Git:
273
+
274
+ - autoconf >= 2.69
275
+ - automake >= 1.14
276
+ - texinfo >= 5.0
277
+
278
+ Optional USB-based adapter drivers need libusb-1.0.
279
+
280
+ Optional USB-Blaster, ASIX Presto and OpenJTAG interface adapter drivers need
281
+ [libftdi](http://www.intra2net.com/en/developer/libftdi/index.php) library.
282
+
283
+ Optional CMSIS-DAP adapter driver needs HIDAPI library.
284
+
285
+ Optional linuxgpiod adapter driver needs libgpiod library.
286
+
287
+ Optional J-Link adapter driver needs libjaylink library.
288
+
289
+ Optional ARM disassembly needs capstone library.
290
+
291
+ Optional development script checkpatch needs:
292
+
293
+ - perl
294
+ - python
295
+ - python-ply
296
+ - pymarkdownlnt
297
+
298
+ ### Compiling OpenOCD
299
+
300
+ To build OpenOCD, use the following sequence of commands:
301
+
302
+ ```sh
303
+ ./bootstrap
304
+ ./configure [options]
305
+ make
306
+ sudo make install
307
+ ```
308
+
309
+ The `bootstrap` command is only necessary when building from the Git repository.
310
+ The `configure` step generates the Makefiles required to build OpenOCD, usually
311
+ with one or more options provided to it.
312
+ The first 'make' step will build OpenOCD and place the final executable in './src/'.
313
+ The final (optional) step, `make install`, places all of the files in the
314
+ required location.
315
+
316
+ To see the list of all the supported options, run `./configure --help`
317
+
318
+ ### Cross-compiling Options
319
+
320
+ Cross-compiling is supported the standard autotools way, you just need
321
+ to specify the cross-compiling target triplet in the --host option,
322
+ e.g. for cross-building for Windows 32-bit with MinGW on Debian:
323
+
324
+ ```sh
325
+ ./configure --host=i686-w64-mingw32 [options]
326
+ ```
327
+
328
+ To make pkg-config work nicely for cross-compiling, you might need an additional
329
+ wrapper script as described at <https://autotools.io/pkgconfig/cross-compiling.html>.
330
+
331
+ This is needed to tell pkg-config where to look for the target
332
+ libraries that OpenOCD depends on. Alternatively, you can specify
333
+ `*_CFLAGS` and `*_LIBS` environment variables directly, see `./configure
334
+ --help` for the details.
335
+
336
+ For a more or less complete script that does all this for you, see `contrib/cross-build.sh`.
337
+
338
+ ### Parallel Port Dongles
339
+
340
+ If you want to access the parallel port using the PPDEV interface you
341
+ have to specify both `--enable-parport` and `--enable-parport-ppdev`, since
342
+ the later option is an option to the parport driver.
343
+
344
+ The same is true for the `--enable-parport-giveio` option, you have to
345
+ use both the `--enable-parport` and the `--enable-parport-giveio` option
346
+ if you want to use giveio instead of ioperm parallel port access
347
+ method.
348
+
349
+ ### Obtaining OpenOCD From Git
350
+
351
+ You can download the current Git version with a Git client of your
352
+ choice from the main repository: `git://git.code.sf.net/p/openocd/code`
353
+
354
+ You may prefer to use a mirror:
355
+
356
+ - <http://repo.or.cz/r/openocd.git>
357
+ - git://repo.or.cz/openocd.git
358
+
359
+ Using the Git command line client, you might use the following command
360
+ to set up a local copy of the current repository (make sure there is no
361
+ directory called "openocd" in the current directory):
362
+
363
+ ```sh
364
+ git clone git://git.code.sf.net/p/openocd/code openocd
365
+ ```
366
+
367
+ Then you can update that at your convenience using `git pull`.
368
+
369
+ There is also a gitweb interface, which you can use either to browse the
370
+ repository or to download arbitrary snapshots using HTTP: <http://repo.or.cz/w/openocd.git>.
371
+
372
+ Snapshots are compressed tarballs of the source tree, about 1.3 MBytes
373
+ each at this writing.
374
+
375
+ ## Permissions delegation
376
+
377
+ Running OpenOCD with root/administrative permissions is strongly
378
+ discouraged for security reasons.
379
+
380
+ For USB devices on GNU/Linux you should use the contrib/60-openocd.rules
381
+ file. It probably belongs somewhere in /etc/udev/rules.d, but
382
+ consult your operating system documentation to be sure. Do not forget
383
+ to add yourself to the "plugdev" group.
384
+
385
+ For parallel port adapters on GNU/Linux and FreeBSD please change your
386
+ "ppdev" (parport* or ppi*) device node permissions accordingly.
387
+
388
+ For parport adapters on Windows you need to run install_giveio.bat
389
+ (it's also possible to use "ioperm" with Cygwin instead) to give
390
+ ordinary users permissions for accessing the "LPT" registers directly.
@@ -0,0 +1,11 @@
1
+ COPYING
2
+ README.md
3
+ pyproject.toml
4
+ openocd_esp32/__init__.py
5
+ openocd_esp32/__main__.py
6
+ openocd_esp32/_version.py
7
+ openocd_esp32.egg-info/PKG-INFO
8
+ openocd_esp32.egg-info/SOURCES.txt
9
+ openocd_esp32.egg-info/dependency_links.txt
10
+ openocd_esp32.egg-info/entry_points.txt
11
+ openocd_esp32.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ openocd-esp32 = openocd_esp32:main
@@ -0,0 +1 @@
1
+ openocd_esp32
@@ -0,0 +1,52 @@
1
+ [build-system]
2
+ requires = ["setuptools>=64", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "openocd-esp32"
7
+ dynamic = ["version"]
8
+ description = "OpenOCD for Espressif chips (ESP32, ESP32-S2, ESP32-S3, ESP32-C3, etc.)"
9
+ readme = {file = "README.md", content-type = "text/markdown"}
10
+ license = {text = "GPL-2.0-or-later"}
11
+ requires-python = ">=3.9"
12
+ authors = [
13
+ {name = "Espressif Systems"},
14
+ ]
15
+ keywords = ["openocd", "esp32", "espressif", "debugger", "jtag", "embedded"]
16
+ classifiers = [
17
+ "Development Status :: 5 - Production/Stable",
18
+ "Environment :: Console",
19
+ "Intended Audience :: Developers",
20
+ "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
21
+ "Operating System :: MacOS :: MacOS X",
22
+ "Operating System :: Microsoft :: Windows",
23
+ "Operating System :: POSIX :: Linux",
24
+ "Programming Language :: Python :: 3",
25
+ "Programming Language :: Python :: 3.9",
26
+ "Programming Language :: Python :: 3.10",
27
+ "Programming Language :: Python :: 3.11",
28
+ "Programming Language :: Python :: 3.12",
29
+ "Programming Language :: Python :: 3.13",
30
+ "Topic :: Software Development :: Debuggers",
31
+ "Topic :: Software Development :: Embedded Systems",
32
+ ]
33
+
34
+ [project.urls]
35
+ Homepage = "https://github.com/espressif/openocd-esp32"
36
+ Documentation = "https://docs.espressif.com/projects/openocd-esp32"
37
+ Repository = "https://github.com/espressif/openocd-esp32"
38
+ Issues = "https://github.com/espressif/openocd-esp32/issues"
39
+
40
+ [project.scripts]
41
+ openocd-esp32 = "openocd_esp32:main"
42
+
43
+ [tool.setuptools]
44
+ packages = ["openocd_esp32"]
45
+ include-package-data = true
46
+ license-files = ["COPYING"]
47
+
48
+ [tool.setuptools.dynamic]
49
+ version = {attr = "openocd_esp32._version.__version__"}
50
+
51
+ [tool.setuptools.package-data]
52
+ openocd_esp32 = ["bin/**/*", "share/**/*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+