|
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. |
| 1 | +# 本仓库持续跟踪最新版OpenOCD,并支持一些未并入主线的国产芯片 |
| 2 | + |
| 3 | +## 引入芯片 |
| 4 | +| 芯片厂商 | 芯片系列 | 源码来源 | 是否测试 | |
| 5 | +| :--- | :--- | :--- | :---: | |
| 6 | +| [爱科微](https://www.aicsemi.com/) | AIC8800 | [aic8800_flash_driver分支](https://github.com/vllogic/openocd_cmsis-dap_v2/tree/aic8800_flash_driver) | × | |
| 7 | +| [爱科微](https://www.aicsemi.com/) | AIC8800M40 | [aic8800_flash_driver分支](https://github.com/vllogic/openocd_cmsis-dap_v2/tree/aic8800_flash_driver) | × | |
| 8 | +| [爱科微](https://www.aicsemi.com/) | AIC8800MC | [aic8800_flash_driver分支](https://github.com/vllogic/openocd_cmsis-dap_v2/tree/aic8800_flash_driver) | × | |
| 9 | +| [雅特力](https://www.arterytek.com/) | AT32F4系列 | [ArteryTek/openocd](https://github.com/ArteryTek/openocd) | × | |
| 10 | +| [雅特力](https://www.arterytek.com/) | AT32WB415xx | [ArteryTek/openocd](https://github.com/ArteryTek/openocd) | × | |
0 commit comments