Openocd compile on Windows

Source: Internet
Author: User
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.


  1. Install cygwin
Required components include GCC, Autoconf, automake, M4, and Perl.


  1. 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


  1. Compile openocd


  • ./Bootstrap
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
Make builds the openocd, and places the final executable in./src/


  1. 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.


  • -Dpkglibdir error:

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.


  1. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.