Openocd compile on Windows
- 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 wigggler (clones), ftdi ft2232 based JTAG interfaces, the amontec JTAG accelerator, and the connected works gw1602. it allows ARM7TDMI and arm92. it allows 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 ipvx ). preliminary support for using the lpc3180's NAND flash controller is supported ded.
This openfacts entry will try to document openocd's current state, and provide general information about the technology involved.
- Install cygwin
Required components include GCC, Autoconf, automake, M4, and Perl.
- Download openocd source code
The openocd wiki entries always document the latest version of openocd. You can download the current SVN version with SVN client of your choice from the following repositories:
svn://svn.berlios.de/openocd/trunk
or
http://svn.berlios.de/svnroot/repos/openocd/trunk
Using the svn command line client, you could use the following command to fetch the latest version (make sure there is no (non-SVN) Directory called "openocd" in the current directory ): SVN checkout SVN: // svn.berlios.de/openocd/trunk
- Compile openocd
Bootstrap generates the configure script, and prepares building on your system.
- ./Configure -- enable-parport -- enable-parport_giveio
Configure generates the makefiles used to build openocd.
Make builds the openocd, and places the final executable in./src/
- Possible compilation errors and solutions:
- An error occurred while compiling parport. C:
Parport. C: 65: 20: SYS/IO. h: no such file or directory
Solution: Define macro _ Win32 in parport. C. Note that this macro cannot be defined in config. H. Otherwise, errors may occur when compiling code of other modules.
Src/Target src/flash
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
Solution: Because GCC does not recognize dpkglibdir, change dpkglibdir.
- Openocd_version macro Error
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
Solution: Change-dpkgbldrev =/"'../guess-rev.sh.
- Run
Telnet local host 4444
Refer:
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