-
About Open On-Chip Debugger
The Open On-Chip Debugger (openocd) aims to provide debugging, in-system programming and boundary-scan testing for embedded target devices. The targets are interfaced using JTAG (IEEE 1149.1) compliant hardware, but this may be extended to other connection types in the future.
Openocd currently supports Wiggler (clones), FTDI FT2232 based JTAG interfaces, the Amontec JTAG Accelerator, and the Gateworks GW1602. It allows ARM7 (ARM7TDMI and ARM720t), ARM9 (ARM920t, ARM922t, ARM926ej-s, ARM966e-s), XScale (PXA27x,PXA25x, IXP42x) and Cortex-M3 (Luminary Stellaris LM3 and ST STM32) based cores to be debugged.
Flash writing is supported for external CFI compatible flashes (Intel and AMD/Spansion command set) and several internal flashes (LPC2000, AT91SAM7, STR7x, STR9x, LM3 and STM32x). Preliminary support for using the LPC3180's NAND flash controller is included.
This OpenFacts entry will try to document openocd's current state, and provide general information about the technology involved.
- 安装cygwin
- 下载openocd源代码
svn://svn.berlios.de/openocd/trunk
or
http://svn.berlios.de/svnroot/repos/openocd/trunk
- 编译openocd
- ./bootstrap
- ./configure --enable-parport --enable-parport_giveio
- make
- 可能出现的编译错误及解决办法:
- 编译parport.c时出错:
parport.c:65:20: sys/io.h: No such file or directory
- -DPKGLIBDIR 错误:
gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/helper -I../../src/jtag -I../../src/target -DPKGLIBDIR=/"/usr/local/lib/openocd/
" -g -O2 -MT flash.o -MD -MP -MF .deps/flash.Tpo -c -o flash.o flash.c
gcc: no input files
- OPENOCD_VERSION宏的错误
gcc -DHAVE_CONFIG_H -I. -I.. -I../src/helper -I../src/jtag -I../src/target -I../src/xsvf -I../src/server -I../src/flash -I../
src/pld -DPKGLIBDIR=/"/usr/local/lib/openocd/" -DPKGBLDDATE=/"`date +%F-%R`/" -DPKGBLDREV=/"`../guess-rev.sh`/" -g -O2 -M
T openocd-openocd.o -MD -MP -MF .deps/openocd-openocd.Tpo -c -o openocd-openocd.o `test -f 'openocd.c' || echo './'`openocd.c
openocd.c: In function `handle_version_command':
openocd.c:55: error: missing terminating " character
openocd.c: In function `main':
openocd.c:93: error: missing terminating " character
- 运行
参考:
1.Building OpenOCD: http://openfacts.berlios.de/index-en.phtml?title=Building_OpenOCD
2.OpenOCD compile on Windows XP: http://forum.sparkfun.com/viewtopic.php?t=7743&highlight=xscale
3.parport issues: http://forum.sparkfun.com/viewtopic.php?t=3795
Open On-Chip Debugger (OpenOCD) 是一个用于嵌入式目标设备调试、编程和边界扫描测试的开源工具,支持通过JTAG接口连接。本文档将介绍在Windows上安装Cygwin,下载OpenOCD源代码,并详细说明如何编译OpenOCD,包括可能遇到的编译错误及其解决方案。

1865

被折叠的 条评论
为什么被折叠?



