SparkFun Forums 

Where electronics enthusiasts find answers.

By rekisum
#77194
Hi Michael,

can you please post clearly (again) where to copy the ftd2xx.lib -> libftd2xx.a to?
I copied it to the /i386 and /amd64 directories, also as to /cygwin/lib and cygwin/lib/mingw.

I also copied th ftd2xx.h to usr/include and usr/include/mingw.
Still get the error:

checking for ftd2xx.lib exists (win32)... checking whether ftd2xx library works.
.. configure: error: Cannot build & run test program using ftd2xx.lib

Maybe its not a good idea to do a compile in the configure script, where you don't get any error or warning messages that could help you to find the problem.
I really did try for hours now! :(
By async
#78263
removed.
Last edited by async on Fri Aug 07, 2009 4:13 pm, edited 1 time in total.
By dougm84
#78308
I'm curious, how do I compiler for the libftdi driver (--enable-ft2232_libftdi) - what files do I need to download, if any, aside from the SVN openocd sourcecode.
By async
#78342
mifi,

Thanks for the very nice tutorial. I finally was able to complile OpenOCD for Windows with the ftd2xx drivers! I have a few comments based on my experience compiling OpenOCD using your tutorial.

1) When installing Cygwin, in addition to the standard installation you need to have all of the following installed also:
-devel: autoconf, automake, gcc-core, libtool, subversion, make
-libs: ioperm, popt

2) When running the ./configure scripts, you must have an the exact same ftd2xx device installed on your computer (by way of previously connecting a device and installing the exact version of the ftd2xx drivers you are compiling with). Otherwise the check and test for ftd2xx.lib will fail and you will get an error like this:
Code: Select all
checking for ftd2xx.lib exists (win32)... checking whether ftd2xx library works. 
.. configure: error: Cannot build & run test program using ftd2xx.lib 
Thanks again for this nice tutorial!
By dougm84
#78433
async wrote: 2) When running the ./configure scripts, you must have an the exact same ftd2xx device installed on your computer (by way of previously connecting a device and installing the exact version of the ftd2xx drivers you are compiling with). Otherwise the check and test for ftd2xx.lib will fail and you will get an error like this:
Code: Select all
checking for ftd2xx.lib exists (win32)... checking whether ftd2xx library works. 
.. configure: error: Cannot build & run test program using ftd2xx.lib 
Thanks again for this nice tutorial!
I'm getting this problem, but am having trouble installing ftd2xx to a device - is it compatible with the Olimex ARM-USB-OCD?

EDIT: ftd2xx or libftdi, heh. I've an Olimex ARM-USB-OCD or an Amontec Tiny
By async
#78458
The Olimex OCD device is compatible with the FTD driver. It comes on the disk that ships with the Olimex OCD.

To be sure you have a clean driver instalation, FTD has a utility calledFTDClean on the page below. Run that to remove all the ftd drivers on your computer. Then reinstall your device with the latest FTD drivers from thier website. This will remove any confusion as to what driver you are actually using.

http://www.ftdichip.com/Resources/Utilities.htm
By pieterc
#79726
Hi everyone,

In case my post gets bumped down, I want to remind everyone that I have created a step by step (expanded) guide to build OpenOCD 0.2.0 for Windows using Cygwin (a Linux-like environment for Windows). It is linked against FTDI's proprietary (non-GPL) FTD2XX Driver to support FT2232x based JTAG interfaces.

Visit:
http://piconomic.berlios.de/build_openocd.html

Best regards,
Pieter
By vaclavpe
#82644
Hello Pieter,

is it possible to compile OpenOcd without Cygwin? I have just MinGW compiler. Or, does anybody have a Makefile for MinGW as "./configure" does not work ?

I currently use OpenOcd version built by Martin Thomas and there is no need to have Cygwin. There is no cygwin.dll near openocd.exe. So it must be somehow possible to build OpenOcd without Cygwin...
By pieterc
#82684
I use Cygwin to build OpenOCD, but the final binary is not dependent on Cygwin DLLs, because of the CC="gcc -mno-cygwin" parameter, i.e. it is MingW in the end.

If you want to use MinGW, maybe you should look at the following post?
viewtopic.php?t=17598

Best regards,
Pieter
By bobcousins
#82851
vaclavpe wrote:Hello Pieter,

is it possible to compile OpenOcd without Cygwin? I have just MinGW compiler. Or, does anybody have a Makefile for MinGW as "./configure" does not work ?

I currently use OpenOcd version built by Martin Thomas and there is no need to have Cygwin. There is no cygwin.dll near openocd.exe. So it must be somehow possible to build OpenOcd without Cygwin...
Hi,

I think if you use the "msys" package you will be able to run configure, I have used this in the past. Msys includes a shell interpreter and the utilities required to run configure scripts.

Update:

I have built a libusb OpenOCD using a Mingw/Msys build route, no Cygwin involved.

There were a few wrinkles in the configure scripts, since some of the packages have moved on. Importantly, "libusb-config" is no longer present in libusb32, I think it can be spoofed with a batch file that simply outputs the libusb version number (I used a DOS exe which loads libusb0.dll and gets the version in fact).

It's also worth noting that the latest OpenOCD source is now in the GIT repository mastered at SourceForge; the SVN mirror at Berlios is no longer maintained. You either need a git client, or can download a snapshot of the tree as a tarball.
By mackinroj
#83454
Hey Mifi,
Myself sandra and I am starting to build openOCD revision 2535 on my windows vista laptop.thanks for giving tips and coding here it will be easy for us.but after installation some
errors ar coming i dont understand why this are running. can you please help me.
stay connected.

Thanks..
By mwoo769
#95185
I am having a problem with one of the first few steps

the step where i use the line
Code: Select all
svn checkout svn://svn.berlios.de/openocd/trunk trunk
in the folder /home/openocd
response is
Code: Select all
svn: No access allowed to this repository
Regards
By aukcspore
#96060
Thank you for much for laying out the steps for building OpenOCD.

ONE BIG QUESTION: DOES THE USB (any FTDI based ) JTAG BE INSTALLED BEFORE I CAN BUILD OPENOCD?

I am using Cygwin (running under Window Vista) and installed it according to
http://piconomic.berlios.de/build_openo ... ILD_PROCES

Following the steps in the first 2 post of this thread:
However I failed to build OpenOCD.
1. ./bootstrap as mentioned does not work for me.
The screen shows:
bash: ./bootstrap: No such file or directory.

2. ./configure --enable-maintainer-mode --disable-werror --disable-shared --enable-parport --enable-parport_giveio --enable-ft2232_libftdi CC="gcc -mno-cygwin"

after a long string of text output.... window vista reported that conftest.exe failed or stop working.
Cygwin console output is:
checking Build & Link with libftdi.....configure:error:Cannot build and run test program using libftdi.

Window Vista complained about conftest.exe program stop: see below:

Apparently according to the Windows Vista report: libusb0.dll is at fault. I did a directory search on my PC and found libsub0.dll in \libusb-win32-device-bin-0.1.12.2\bin I wonder if this is the problem and I need to install a FTDI device to cause this libusb0.dll to be installed and recognised by the Windows. If I don't have a FTDI device installed can I still get configure to work by putting libusb0.dll into somewhere in the windows system directory. If this possible I hope someone can me point to the right directory.

Before this I tried building Openocd with ftd2xxx. which also ended in failure. But someone was saying that I need to have a real FTDI device installed before I can build openocd. I before I get a JTAG device I want to be sure I can compile the tools to use it. So I gave up this FTDI lib and go for the libsub + libftdi combo.

I hope somebody can help. I had been doing building thing for a quite awhile.

Regards


Window Vista failure details:
Problem signature:
Problem Event Name: APPCRASH
Application Name: conftest.exe
Application Version: 0.0.0.0
Application Timestamp: 4b99f097
Fault Module Name: libusb0.dll
Fault Module Version: 6.0.6002.18005
Fault Module Timestamp: 49e03821
Exception Code: c0000135
Exception Offset: 00009eed
OS Version: 6.0.6002.2.2.0.768.3
Locale ID: 18441
Additional Information 1: 9d13
Additional Information 2: 1abee00edb3fc1158f9ad6f44f0f6be8
Additional Information 3: 9d13
Additional Information 4: 1abee00edb3fc1158f9ad6f44f0f6be8