The ft2232 driver is deprecated error cygwin

OpenOCD JTAG debugging with the Bus Pirate.

The ft2232 driver is deprecated error cygwin

Postby relax79 » Sat Jan 02, 2016 4:58 pm

Hello friends, i am try the use buspirate with openocd by following this tutorial "http://dangerousprototypes.com/docs/Gonemad's_Bus_Pirate/OpenOCD_walk_through" but i get a error at the end like this "configure: error: The ft2232 driver is deprecated, use --enable-ftdi to build its replacement, or force the old driver with --enable-legacy-ft2232_ftd2xx
"

Code: Select all
$ ./bootstrap
+ aclocal
+ libtoolize --automake --copy
+ autoconf
+ autoheader
+ automake --gnu --add-missing --copy
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at /usr/bin/automake-1.14 line 3930.
configure.ac:26: installing './compile'
configure.ac:37: installing './config.guess'
configure.ac:37: installing './config.sub'
configure.ac:16: installing './install-sh'
configure.ac:16: installing './missing'
Makefile.am:23: warning: wildcard $(srcdir: non-POSIX variable name
Makefile.am:23: (probably a GNU make extension)
Makefile.am: installing './INSTALL'
doc/Makefile.am:1: installing 'doc/mdate-sh'
doc/Makefile.am:1: installing 'doc/texinfo.tex'
src/Makefile.am: installing './depcomp'
Setting up submodules
Submodule 'jimtcl' (http://repo.or.cz/r/jimtcl.git) registered for path 'jimtcl'
Submodule 'src/jtag/drivers/libjaylink' (http://repo.or.cz/r/libjaylink.git) registered for path 'src/jtag/drivers/libjaylink'
Submodule 'tools/git2cl' (http://repo.or.cz/r/git2cl.git) registered for path 'tools/git2cl'
Cloning into 'jimtcl'...
remote: Counting objects: 6367, done.
remote: Total 6367 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (6367/6367), 6.73 MiB | 48.00 KiB/s, done.
Resolving deltas: 100% (4659/4659), done.
Checking connectivity... done.
Submodule path 'jimtcl': checked out '51f65c6d38fbf86e1f0b036ad336761fd2ab7fa0'
Cloning into 'src/jtag/drivers/libjaylink'...
remote: Counting objects: 418, done.
Receiving objects:  25% (remote: Total 418 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (418/418), 140.55 KiB | 62.00 KiB/s, done.
Resolving deltas: 100% (323/323), done.
Checking connectivity... done.
Submodule path 'src/jtag/drivers/libjaylink': checked out '83f6e7c4d86035c848195817251320b4b81671b0'
Cloning into 'tools/git2cl'...
remote: Counting objects: 64, done.
remote: Total 64 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (64/64), done.
Checking connectivity... done.
Submodule path 'tools/git2cl': checked out '8373c9f74993e218a08819cbcdbab3f3564bbeba'
Bootstrap complete. Quick build instructions:
./configure ....

rel@x@casper-1715d14f /cygdrive/c/myusr/openocd
$ ./configure --enable-buspirate --enable-maintainer-mode --disable-werror --disable-shared --enable-ft2232_ftd2xx --with-ftd2xx-win32-zipdir=/cygdrive/c/myusr/ftd2xx
checking for makeinfo... makeinfo
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking for ranlib... ranlib
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.23... yes
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc -std=gnu99... /usr/i686-pc-cygwin/bin/ld.exe
checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 8192
checking how to convert i686-pc-cygwin file names to i686-pc-cygwin format... func_convert_file_noop
checking how to convert i686-pc-cygwin file names to toolchain format... func_convert_file_noop
checking for /usr/i686-pc-cygwin/bin/ld.exe option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking for dlltool... dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_implib
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... (cached) ranlib
checking command to parse /usr/bin/nm -B output from gcc -std=gnu99 object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no
checking for gcc -std=gnu99 option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc -std=gnu99 PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc -std=gnu99 static flag -static works... yes
checking if gcc -std=gnu99 supports -c -o file.o... yes
checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes
checking whether the gcc -std=gnu99 linker (/usr/i686-pc-cygwin/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for an ANSI C-conforming const... yes
checking for unsigned long long int... yes
checking for long long int... yes
checking for library containing ioperm... -lioperm
checking for library containing dlopen... none required
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for arpa/inet.h... yes
checking elf.h usability... yes
checking elf.h presence... yes
checking for elf.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for ifaddrs.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking for netinet/in.h... yes
checking for netinet/tcp.h... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for strings.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for sys/stat.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for sys/types.h... (cached) yes
checking for unistd.h... (cached) yes
checking for net/if.h... yes
checking whether to enable assertions... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether byte ordering is bigendian... no
checking for strndup... yes
checking for strnlen... yes
checking for gettimeofday... yes
checking for usleep... yes
checking for vasprintf... yes
checking whether to build a release... no
configure: Using: ftdichip.com library: /cygdrive/c/myusr/ftd2xx
checking whether to build Doxygen as HTML... yes
checking whether to build Doxygen as PDF... no
checking whether to enable verbose JTAG I/O messages... no
checking whether to enable verbose USB I/O messages... no
checking whether to enable verbose USB communication messages... no
checking whether to enable malloc free space logging... no
configure: error: The ft2232 driver is deprecated, use --enable-ftdi to build its replacement, or force the old driver with --enable-legacy-ft2232_ftd2xx 

rel@x@casper-1715d14f /cygdrive/c/myusr/openocd
$



And another question, is this necessary for using openocd (compiling) or installer exist on somewhere?
relax79
Newbie
Newbie
 
Posts: 10
Joined: Fri Apr 03, 2015 7:35 pm

Re: The ft2232 driver is deprecated error cygwin

Postby relax79 » Sat Jan 02, 2016 11:11 pm

I am solve the problem change this command
"./configure --enable-buspirate --enable-maintainer-mode --disable-werror --disable-shared --enable-ft2232_ftd2xx --with-ftd2xx-win32-zipdir=/cygdrive/c/myusr/ftd2xx"
to this
"./configure --enable-buspirate --enable-maintainer-mode --disable-werror --disable-shared --enable-legacy-ft2232_ftd2xx --with-ftd2xx-win32-zipdir-ftd2xx=/cygdrive/c/myusr/ftd2xx"
but this time i get this error at the end and process not complete
"configure: error: Cannot build & run test program using ftd2xx.lib"
anyone help for this, I'd really appreciate. Sorry for my English, thanks.
relax79
Newbie
Newbie
 
Posts: 10
Joined: Fri Apr 03, 2015 7:35 pm

Re: The ft2232 driver is deprecated error cygwin

Postby rdiez » Mon Jan 04, 2016 9:10 am

I kept some notes that might help you, but I wished I had written them a little cleaner and more detailed. Please post again if you find a solution that works. There you go:

"In the past, OpenOCD used project libusb-win32, which has 2 alternative Windows kernel drivers. However, libusb-win32 is in maintenance mode only, they advise you to move to different projects. OpenOCD has moved to libusb-1.0, which apparently can only use Microsoft's WinUSB driver, as this project has no Windows kernel driver. Use tool Zadig to change the Windows kernel driver used by your serial device."

With that information, you may get OpenOCD's FTDI driver to work. You will find more information here:

https://sourceforge.net/p/openocd/mailm ... /31864892/

Regards,
rdiez
rdiez
Newbie
Newbie
 
Posts: 13
Joined: Tue Sep 27, 2011 11:48 am

Re: The ft2232 driver is deprecated error cygwin

Postby relax79 » Tue Feb 02, 2016 7:32 am

Thanks rdiez
I am totally noob for these things, sorry but i am compile with ftd2xx succesfully, i am fail because i am add extra "-ftd2xx" later then zipdir my mistake.I am delete -ftd2xx and compile is done.
I need different answers right now. Can i need these patches ?
"http://dangerousprototypes.com/forum/viewtopic.php?f=27&t=4135&p=47834#p47834"
"http://dangerousprototypes.com/forum/viewtopic.php?t=915#p11728"
or already merged with latest buspirate.c file in latest openocd git repository ?
Sorry for my English, best regards.
relax79
Newbie
Newbie
 
Posts: 10
Joined: Fri Apr 03, 2015 7:35 pm

Re: The ft2232 driver is deprecated error cygwin

Postby rdiez » Tue Feb 02, 2016 10:31 am

I'm afraid I can't remember now, you'll have to look at OpenOCD's source code to see if the patches are there.
rdiez
Newbie
Newbie
 
Posts: 13
Joined: Tue Sep 27, 2011 11:48 am

Re: The ft2232 driver is deprecated error cygwin

Postby rmedure » Sat Feb 27, 2016 9:32 pm

I have exactly the same problem. When I try to configure with:
./configure --enable-buspirate --enable-maintainer-mode --disable-werror --disable-shared --enable-legacy-ft2232_ftd2xx --with-ftd2xx-win32-zipdir=/cygdrive/c/myusr/ftd2xx

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


In addition, if I try as a work-around to configure with ftdi device, and then compile:
./configure --enable-buspirate --enable-maintainer-mode --disable-werror --disable-shared --enable-ftdi
make && make install

I get various "... visibility attribute not supported in this configuration ...", and then later "cc1: all warnings being treated as errors", and then various "... recipe for target 'all' failed ...".

Does anyone know how to resolve this issue?!
rmedure
Newbie
Newbie
 
Posts: 8
Joined: Sat Feb 27, 2016 9:10 pm

Re: The ft2232 driver is deprecated error cygwin

Postby Graham242 » Thu Mar 03, 2016 12:02 pm

To be honest, I always found pulling down Freddy Chopin's Windows OpenOCD build far easier than trying to go through all the hassle of compiling it yourself. Admittedly I've always used a bus blaster for this, not the bus pirate.
Graham242
Jr. Member
Jr. Member
 
Posts: 57
Joined: Wed Dec 14, 2011 3:57 am

Re: The ft2232 driver is deprecated error cygwin

Postby rmedure » Thu Mar 03, 2016 4:25 pm

Graham242 wrote:To be honest, I always found pulling down Freddy Chopin's Windows OpenOCD build far easier than trying to go through all the hassle of compiling it yourself. Admittedly I've always used a bus blaster for this, not the bus pirate.


Unfortunately, Freddy Chopin does not enable buspirate in his builds ...
rmedure
Newbie
Newbie
 
Posts: 8
Joined: Sat Feb 27, 2016 9:10 pm

Re: The ft2232 driver is deprecated error cygwin

Postby Graham242 » Fri Mar 04, 2016 7:04 am

Ok, that is frustrating. Apologies for the misdirection.

A quick look at the source shows that in src/jtag/drivers/buspirate.c all the driver is actually doing is a straight open() of whatever serial port was provided in the config:
Code: Select all
static int buspirate_serial_open(char *port)
{
   int fd;
   fd = open(buspirate_port, O_RDWR | O_NOCTTY | O_NDELAY);
   return fd;
}


The bus pirate driver doesn't appear to go anywhere near anything other than a standard serial port. If you're using only the bus pirate for JTAG, then I'd wonder if you could compile up without the FT2232 driver and save yourself the problems it gives you?

No, I haven't tested this, as I don't have a suitable toolchain on my machine.
Graham242
Jr. Member
Jr. Member
 
Posts: 57
Joined: Wed Dec 14, 2011 3:57 am

Re: The ft2232 driver is deprecated error cygwin

Postby rmedure » Fri Mar 04, 2016 7:52 am

Thank you so much for responding! Where exactly is it getting the port? In my Cygwin environment, I've confirmed serial communication with the buspirate works at ttyS2 (windows com3) when using the latest FTDI drivers in windows (no filter driver).
rmedure
Newbie
Newbie
 
Posts: 8
Joined: Sat Feb 27, 2016 9:10 pm

Re: The ft2232 driver is deprecated error cygwin

Postby Graham242 » Mon Mar 07, 2016 2:26 am

It looks like buspirate_port only appears in buspirate.c. There's a COMMAND_HANDLER buspirate_handle_port_command that appears to extract it, and a block of configuration that lets the rest of OpenOCD know what commands are supported. If you find buspirate_command_handlers[] in buspirate.c you will see it.

The net result is that the configuration buspirate_port is extracted from configuration commands, and sent to the buspirate JTAG module.
Graham242
Jr. Member
Jr. Member
 
Posts: 57
Joined: Wed Dec 14, 2011 3:57 am

Re: The ft2232 driver is deprecated error cygwin

Postby rmedure » Thu Mar 10, 2016 1:33 pm

Ok, so I'm not sure how to solve this so that it will compile. I'm not providing any configuration information (that I'm aware) that would indicate which port to try to open.
rmedure
Newbie
Newbie
 
Posts: 8
Joined: Sat Feb 27, 2016 9:10 pm

Re: The ft2232 driver is deprecated error cygwin

Postby rmedure » Sun Mar 20, 2016 10:52 am

Anybody?
rmedure
Newbie
Newbie
 
Posts: 8
Joined: Sat Feb 27, 2016 9:10 pm

Re: The ft2232 driver is deprecated error cygwin

Postby Sjaak » Sun Mar 20, 2016 12:33 pm

If the ftdi part isn't needed as Graham242 says. the used com port is in the bpv3.cfg file as far as I can tell. Have you tried disabling the ftdi flags and compile it?

Since this is more a how-to-compile openocd question: have you asked this question too at openocd.org?
For my projects and failures see my blog: http://SMDprutser.nl/
User avatar
Sjaak
Fellow
Fellow
 
Posts: 3293
Joined: Sun Jan 03, 2010 2:45 pm
Location: Hiero


Return to OpenOCD JTAG