没有合适的资源?快使用搜索试试~ 我知道了~
首页openocd使用手册
openocd使用手册
![](https://csdnimg.cn/release/wenkucmsfe/public/img/star.98a08eaa.png)
OpenOCD JTAG server is a open-source on-chip debug solution for targets based on the ARM7, ARM9, Cortex-M3 and XSCALE families with Embedded-ICE macrocell support via JTAG port. It enables source level debugging with the standard GNU Debugger GDB compiled for the ARM architecture. In addition internal and external FLASH memory programming is supported. Any GDB aware integrated development environment, example Eclipse IDE, IAR or Emacs, can benefit from OpenOCD.
资源详情
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/3274203/bg1.jpg)
Open On-Chip Debugger:
OpenOCD User’s Guide
for release 0.4.0-dev
25 November 2009
![](https://csdnimg.cn/release/download_crawler_static/3274203/bg2.jpg)
This User’s Guide documents release 0.4.0-dev, dated 25 November 2009, of the Open On-
Chip Debugger (OpenOCD).
• Copyright
c
2008 The OpenOCD Project
• Copyright
c
2007-2008 Spencer Oliver spen@spen-soft.co.uk
• Copyright
c
2008 Oyvind Harboe oyvind.harboe@zylin.com
• Copyright
c
2008 Duane Ellis openocd@duaneellis.com
• Copyright
c
2009 David Brownell
Permission is granted to copy, distribute and/or modify this document under
the terms of the GNU Free Documentation License, Version 1.2 or any later
version published by the Free Software Foundation; with no Invariant Sections,
with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license
is included in the section entitled “GNU Free Documentation License”.
![](https://csdnimg.cn/release/download_crawler_static/3274203/bg3.jpg)
i
Short Contents
About . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1 OpenOCD Developer Resources. . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 JTAG Hardware Dongles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3 About JIM-Tcl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4 Running . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5 OpenOCD Project Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
6 Config File Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
7 Daemon Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
8 Interface - Dongle Configuration . . . . . . . . . . . . . . . . . . . . . . . . 28
9 Reset Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
10 TAP Declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
11 CPU Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
12 Flash Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
13 NAND Flash Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
14 PLD/FPGA Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
15 General Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
16 Architecture and Core Commands . . . . . . . . . . . . . . . . . . . . . . . 79
17 JTAG Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
18 Boundary Scan Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
19 TFTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
20 GDB and OpenOCD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
21 Tcl Scripting API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
22 FAQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
23 Tcl Crash Course . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
A The GNU Free Documentation License. . . . . . . . . . . . . . . . . . 110
OpenOCD Concept Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Command and Driver Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
![](https://csdnimg.cn/release/download_crawler_static/3274203/bg4.jpg)
ii
Table of Contents
About . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
What is OpenOCD? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
OpenOCD Web Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Latest User’s Guide:. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
OpenOCD User’s Forum. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1 OpenOCD Developer Resources . . . . . . . . . . . . . . . 2
1.1 OpenOCD GIT Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Doxygen Developer Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 OpenOCD Developer Mailing List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 JTAG Hardware Dongles . . . . . . . . . . . . . . . . . . . . . . 3
2.1 Choosing a Dongle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Stand alone Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.3 USB FT2232 Based . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.4 USB JLINK based . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.5 USB RLINK based . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.6 USB Other. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.7 IBM PC Parallel Printer Port Based . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.8 Other... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3 About JIM-Tcl. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4 Running . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5 OpenOCD Project Setup . . . . . . . . . . . . . . . . . . . . . 10
5.1 Hooking up the JTAG Adapter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.2 Project Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.3 Configuration Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.4 User Config Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.5 Project-Specific Utilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.6 Target Software Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
6 Config File Guidelines . . . . . . . . . . . . . . . . . . . . . . . . 15
6.1 Interface Config Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
6.2 Board Config Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
6.2.1 Communication Between Config files. . . . . . . . . . . . . . . . . . . . . . 17
6.2.2 Variable Naming Convention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
6.2.3 The reset-init Event Handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6.2.4 JTAG Clock Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6.3 Target Config Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
![](https://csdnimg.cn/release/download_crawler_static/3274203/bg5.jpg)
iii
6.3.1 Default Value Boiler Plate Code . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.3.2 Adding TAPs to the Scan Chain . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.3.3 Add CPU targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.3.4 Chip Reset Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6.3.5 ARM Core Specific Hacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6.3.6 Internal Flash Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6.4 Translating Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
7 Daemon Configuration . . . . . . . . . . . . . . . . . . . . . . . . 24
7.1 Configuration Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.2 Entering the Run Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.3 TCP/IP Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
7.4 GDB Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
7.5 Event Polling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
8 Interface - Dongle Configuration . . . . . . . . . . . . . 28
8.1 Interface Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
8.2 Interface Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
8.3 JTAG Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
9 Reset Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
9.1 Types of Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
9.2 SRST and TRST Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
9.3 Commands for Handling Resets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
9.4 Custom Reset Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
10 TAP Declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
10.1 Scan Chains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
10.2 TAP Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
10.3 TAP Declaration Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
10.4 Other TAP commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
10.5 TAP Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
10.6 Enabling and Disabling TAPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
10.7 Autoprobing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
11 CPU Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 45
11.1 Target List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
11.2 Target CPU Types and Variants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
11.3 Target Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
11.4 Other $target name Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
11.5 Target Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
剩余129页未读,继续阅读
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)