SparkFun Forums 

Where electronics enthusiasts find answers.

Open source ARM Debugger
By davebryan
#19181
Hi,

I'm trying to build OpenOCD SVNr98 with FT2232 support on Cygwin. My configuration is:

$ ./configure -with-ftd2xx=C:/OpenOCD/ftd2xxlib/static_lib --enable-ft2232_ftd2xx --disable-ft2232_libftdi --disable-amtjtagaccel
--disable-ep93xx --disable-parport --disable-parport_ppdev

When I run make the last few lines of output are:

make[3]: Entering directory `/home/Dave/trunk/src'
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../src/helper -I../src/jtag -I../src/target -I../src/xsvf -I../src/server -I../src/flash
-g -O2 -MT openocd.o -MD -MP -MF ".deps/openocd.Tpo" -c -o openocd.o openocd.c; \
then mv -f ".deps/openocd.Tpo" ".deps/openocd.Po"; else rm -f ".deps/openocd.Tpo"; exit 1; fi
gcc -g -O2 -o openocd.exe openocd.o ../src/xsvf/libxsvf.a ../src/target/libtarget.a ../src/jtag/libjtag.a
../src/helper/libhelper.a ../src/server/libserver.a ../src/helper/libhelper.a ../src/flash/libflash.a ../src/target/libtarget.a
C:/OpenOCD/ftd2xxlib/static_lib/FTD2XX.lib
../src/jtag/libjtag.a(ft2232.o): In function `ft2232_write':
/home/Dave/trunk/src/jtag/ft2232.c:154: undefined reference to `_FT_Write'
../src/jtag/libjtag.a(ft2232.o): In function `ft2232_read':
/home/Dave/trunk/src/jtag/ft2232.c:186: undefined reference to `_FT_Read'
../src/jtag/libjtag.a(ft2232.o): In function `ft2232_init':
/home/Dave/trunk/src/jtag/ft2232.c:962: undefined reference to `_FT_OpenEx'
/home/Dave/trunk/src/jtag/ft2232.c:997: undefined reference to `_FT_SetLatencyTimer'
/home/Dave/trunk/src/jtag/ft2232.c:1003: undefined reference to `_FT_GetLatencyTimer'
/home/Dave/trunk/src/jtag/ft2232.c:1013: undefined reference to `_FT_SetTimeouts'
/home/Dave/trunk/src/jtag/ft2232.c:1019: undefined reference to `_FT_SetBitMode'
/home/Dave/trunk/src/jtag/ft2232.c:1080: undefined reference to `_FT_Purge'
/home/Dave/trunk/src/jtag/ft2232.c:967: undefined reference to `_FT_ListDevices'
/home/Dave/trunk/src/jtag/ft2232.c:977: undefined reference to `_FT_ListDevices'
../src/jtag/libjtag.a(ft2232.o): In function `ft2232_quit':
/home/Dave/trunk/src/jtag/ft2232.c:1333: undefined reference to `_FT_Close'
collect2: ld returned 1 exit status

It seems Make can't find the the FTxx functions in FTD2XX.lib but I've no idea why. Does anyone have any clues ?

Thanks
Dave
By Dominic
#19183
Hello Dave,

your configure line seems to have only one dash in front of the --with-ftd2xx option. Also, there might be a problem with the Windows path you've specified - try specifying it as a Cygwin path, i.e. /cygdrive/c/OpenOCD/ftd2xxlib/static_lib.

Regards,

Dominic
By davebryan
#19184
Thanks for the suggestions Dominic. It turned out that I didn't have the latest FTD2XX.lib file. Now I'm able to build with FT2232 support (at least an exe is built).

I've now got a different problem. When I run

openocd -f arm7_ftd2xx.cfg

I get:

Info: openocd.c:87 main(): Open On-Chip Debugger (2006-09-07 20:00 CEST)
Info: configuration.c:50 configuration_output_handler(): Command ft2232_device_desc not found
Error: jtag.c:1248 jtag_init(): No valid jtag interface found (ftd2xx)
Error: jtag.c:1249 jtag_init(): compiled-in jtag interfaces:
Error: jtag.c:1252 jtag_init(): 0: ft2232

I'm not clear if OpenOCD can't find a FT2232 or whether FT2232 support is still missing. I've been using an old version (r62) and that is able to find a FT2232 device. Any clues ?

Regards
Dave
By Dominic
#19185
The configuration file syntax changed - the ftdi2232 and ftd2xx interfaces got united into a single ft2232 that can be built for both, FTDI's FTD2XX and the open-source libftdi (decided during configure). Your .cfg file still has the ftd2xx in it. Just replace ftd2xx with ft2232 (the other options, too, like ftd2xx_device_desc -> ft2232_device_desc).

Regards,

Dominic
By davebryan
#19186
Thanks Dominic that sorted it