没有合适的资源?快使用搜索试试~ 我知道了~
首页openocd使用手册
openocd使用手册
5星 · 超过95%的资源 需积分: 50 92 下载量 120 浏览量
更新于2023-07-01
收藏 701KB PDF 举报
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.
资源详情
资源推荐
Open On-Chip Debugger:
OpenOCD User’s Guide
for release 0.4.0-dev
25 November 2009
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”.
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
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
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页未读,继续阅读
panda_guo
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 保险服务门店新年工作计划PPT.pptx
- 车辆安全工作计划PPT.pptx
- ipqc工作总结PPT.pptx
- 车间员工上半年工作总结PPT.pptx
- 保险公司员工的工作总结PPT.pptx
- 报价工作总结PPT.pptx
- 冲压车间实习工作总结PPT.pptx
- ktv周工作总结PPT.pptx
- 保育院总务工作计划PPT.pptx
- xx年度现代教育技术工作总结PPT.pptx
- 出纳的年终总结PPT.pptx
- 贝贝班班级工作计划PPT.pptx
- 变电值班员技术个人工作总结PPT.pptx
- 大学生读书活动策划书PPT.pptx
- 财务出纳月工作总结PPT.pptx
- 大学生“三支一扶”服务期满工作总结(2)PPT.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功