Skip to content

Commit

Permalink
Remove since long deprecated ft2232 driver
Browse files Browse the repository at this point in the history
Purge all legacy interface configurations so there's no more confusion
over which one to use.

Also remove doc/INSTALL.txt which mentions ft2232 but otherwise just
duplicates what INSTALL says.

Change-Id: Ic94f808f123d4917e600b79309f1272c78a7bb11
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/3236
Tested-by: jenkins
Reviewed-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
  • Loading branch information
nattgris committed Nov 6, 2016
1 parent f60d42b commit cc2d4f0
Show file tree
Hide file tree
Showing 62 changed files with 13 additions and 5,372 deletions.
5 changes: 1 addition & 4 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ e.g.:
openocd -f interface/stlink-v2-1.cfg -c "transport select hla_swd" \
-f target/stm32l0.cfg

NB: when using an FTDI-based adapter you should prefer configs in the
ftdi directory; the old configs for the ft2232 are deprecated.

After OpenOCD startup, connect GDB with

(gdb) target extended-remote localhost:3333
Expand Down Expand Up @@ -228,7 +225,7 @@ USB-based adapters depend on libusb-1.0 and some older drivers require
libusb-0.1 or libusb-compat-0.1. A compatible implementation, such as
FreeBSD's, additionally needs the corresponding .pc files.

USB-Blaster, ASIX Presto, OpenJTAG and ft2232 interface adapter
USB-Blaster, ASIX Presto and OpenJTAG interface adapter
drivers need either one of:
- libftdi: http://www.intra2net.com/en/developer/libftdi/index.php
- ftd2xx: http://www.ftdichip.com/Drivers/D2XX.htm (proprietary,
Expand Down
3 changes: 0 additions & 3 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ interface support:
-# rewrite implementation to use non-blocking I/O
- J-Link driver:
- fix to work with long scan chains, such as R.Doss's svf test.
- FT2232 (libftdi):
- make performance comparable to alternatives (on Win32, D2XX is faster)
- make usability comparable to alternatives
- Autodetect USB based adapters; this should be easy on Linux. If there's
more than one, list the options; otherwise, just select that one.

Expand Down
97 changes: 6 additions & 91 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -397,26 +397,6 @@ AC_ARG_ENABLE([parport_giveio],
[Enable use of giveio for parport (for CygWin only)]),
[parport_use_giveio=$enableval], [parport_use_giveio=])

AC_ARG_ENABLE([ft2232_libftdi], [], [
if test $enableval = yes; then
AC_MSG_ERROR([The ft2232 driver is deprecated, use --enable-ftdi to build its replacement, or force the old driver with --enable-legacy-ft2232_libftdi])
fi
])

AC_ARG_ENABLE([ft2232_ftd2xx], [], [
if test $enableval = yes; then
AC_MSG_ERROR([The ft2232 driver is deprecated, use --enable-ftdi to build its replacement, or force the old driver with --enable-legacy-ft2232_ftd2xx])
fi
])

AC_ARG_ENABLE([legacy-ft2232_libftdi],
AS_HELP_STRING([--enable-legacy-ft2232_libftdi], [(DEPRECATED) Enable building support for FT2232 based devices using the libftdi library]),
[build_ft2232_libftdi=$enableval], [build_ft2232_libftdi=no])

AC_ARG_ENABLE([legacy-ft2232_ftd2xx],
AS_HELP_STRING([--enable-legacy-ft2232_ftd2xx], [(DEPRECATED) Enable building support for FT2232 based devices using the D2XX library from ftdichip.com]),
[build_ft2232_ftd2xx=$enableval], [build_ft2232_ftd2xx=no])

AC_ARG_ENABLE([jtag_vpi],
AS_HELP_STRING([--enable-jtag_vpi], [Enable building support for JTAG VPI]),
[build_jtag_vpi=$enableval], [build_jtag_vpi=no])
Expand Down Expand Up @@ -699,18 +679,6 @@ else
AC_DEFINE([BUILD_BITBANG], [0], [0 if you don't want a bitbang interface.])
fi

if test $build_ft2232_libftdi = yes; then
AC_DEFINE([BUILD_FT2232_LIBFTDI], [1], [1 if you want libftdi ft2232.])
else
AC_DEFINE([BUILD_FT2232_LIBFTDI], [0], [0 if you don't want libftdi ft2232.])
fi

if test $build_ft2232_ftd2xx = yes; then
AC_DEFINE([BUILD_FT2232_FTD2XX], [1], [1 if you want ftd2xx ft2232.])
else
AC_DEFINE([BUILD_FT2232_FTD2XX], [0], [0 if you don't want ftd2xx ft2232.])
fi

if test $build_usb_blaster_libftdi = yes; then
AC_DEFINE([BUILD_USB_BLASTER_LIBFTDI], [1], [1 if you want libftdi usb_blaster.])
else
Expand Down Expand Up @@ -815,7 +783,7 @@ then
AC_MSG_ERROR([The option: with_ftd2xx_linux_tardir is for LINUX only.])
fi

if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes -o $build_usb_blaster_ftd2xx = yes -o $build_openjtag_ftd2xx = yes; then
if test $build_presto_ftd2xx = yes -o $build_usb_blaster_ftd2xx = yes -o $build_openjtag_ftd2xx = yes; then
AC_MSG_CHECKING([for ftd2xx.lib exists (win32)])

# if we are given a zipdir...
Expand Down Expand Up @@ -864,7 +832,7 @@ then
AC_MSG_ERROR([The option: with_ftd2xx_linux_tardir is for LINUX only.])
fi

if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes -o $build_usb_blaster_ftd2xx = yes ; then
if test $build_presto_ftd2xx = yes -o $build_usb_blaster_ftd2xx = yes ; then
AC_MSG_CHECKING([for libftd2xx.a (darwin)])

if test ! -f /usr/local/include/ftd2xx.h ; then
Expand All @@ -885,10 +853,10 @@ then
AC_MSG_ERROR([The option: --with-ftd2xx-win32-zipdir is for win32 only])
fi

if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes -o $build_usb_blaster_ftd2xx = yes -o $build_openjtag_ftd2xx = yes; then
if test $build_presto_ftd2xx = yes -o $build_usb_blaster_ftd2xx = yes -o $build_openjtag_ftd2xx = yes; then
# Must be linux
if test $host_os != linux-gnu && test $host_os != linux ; then
AC_MSG_ERROR([The (linux) ftd2xx library from FTDICHIP.com is linux only. Try --enable-ft2232-libftdi instead])
AC_MSG_ERROR([The (linux) ftd2xx library from FTDICHIP.com is linux only. Try --enable-*-libftdi instead])
fi
# Are we given a TAR directory?
if test "${with_ftd2xx_linux_tardir+set}" = set
Expand Down Expand Up @@ -948,7 +916,7 @@ if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes -o $build_usb_b
fi
fi # linux

if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes -o $build_usb_blaster_ftd2xx = yes ; then
if test $build_presto_ftd2xx = yes -o $build_usb_blaster_ftd2xx = yes ; then

# Before we go any further - make sure we can *BUILD* and *RUN*
# a simple app with the "ftd2xx.lib" file - in what ever form we where given
Expand Down Expand Up @@ -982,29 +950,6 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
AC_MSG_RESULT([Skipping as we are cross-compiling])
])

AC_MSG_CHECKING([for ftd2xx highspeed device support])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include "confdefs.h"
#if IS_WIN32
#include "windows.h"
#endif
#include <stdio.h>
#include <ftd2xx.h>
DWORD x = FT_DEVICE_4232H;
]], [])], [
AC_DEFINE([BUILD_FT2232_HIGHSPEED], [1],
[Support FT2232H/FT4232HS with FTD2XX or libftdi.])
build_ft2232_highspeed=yes
], [
build_ft2232_highspeed=no
])
AC_MSG_RESULT([$build_ft2232_highspeed])

if test $build_ft2232_highspeed = no; then
AC_MSG_WARN([You need a newer FTD2XX driver (version 2.04.16 or later).])
fi

AC_MSG_CHECKING([for ftd2xx FT232H device support])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include "confdefs.h"
Expand Down Expand Up @@ -1032,7 +977,7 @@ LDFLAGS=$LDFLAGS_SAVE
CFLAGS=$CFLAGS_SAVE
fi

if test $build_ft2232_libftdi = yes -o $build_usb_blaster_libftdi = yes -o \
if test $build_usb_blaster_libftdi = yes -o \
$build_openjtag_ftdi = yes -o $build_presto_libftdi = yes; then

# we can have libftdi or libftdi1, so check it and use the latest one
Expand Down Expand Up @@ -1079,25 +1024,6 @@ if test $build_ft2232_libftdi = yes -o $build_usb_blaster_libftdi = yes -o \
AC_SEARCH_LIBS([ftdi_new], [], [], [AC_MSG_ERROR([Cannot link with libftdi])])
])

AC_MSG_CHECKING([for libftdi highspeed device support])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include <ftdi.h>
]], [[
enum ftdi_chip_type x = TYPE_2232H;
]])], [
AC_DEFINE([BUILD_FT2232_HIGHSPEED], [1],
[Support FT2232H/FT4232HS with FTD2XX or libftdi.])
build_ft2232_highspeed=yes
], [
build_ft2232_highspeed=no
])
AC_MSG_RESULT([$build_ft2232_highspeed])

if test $build_ft2232_highspeed = no; then
AC_MSG_WARN([You need a newer libftdi version (0.16 or later).])
fi

AC_MSG_CHECKING([for libftdi FT232H device support])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
Expand Down Expand Up @@ -1205,8 +1131,6 @@ AM_CONDITIONAL([IOUTIL], [test $build_ioutil = yes])
AM_CONDITIONAL([AT91RM9200], [test $build_at91rm9200 = yes])
AM_CONDITIONAL([BCM2835GPIO], [test $build_bcm2835gpio = yes])
AM_CONDITIONAL([BITBANG], [test $build_bitbang = yes])
AM_CONDITIONAL([FT2232_LIBFTDI], [test $build_ft2232_libftdi = yes])
AM_CONDITIONAL([FT2232_DRIVER], [test $build_ft2232_ftd2xx = yes -o $build_ft2232_libftdi = yes])
AM_CONDITIONAL([USB_BLASTER_LIBFTDI], [test $build_usb_blaster_libftdi = yes])
AM_CONDITIONAL([USB_BLASTER_FTD2XX], [test $build_usb_blaster_ftd2xx = yes])
AM_CONDITIONAL([JTAG_VPI], [test $build_jtag_vpi = yes -o $build_jtag_vpi = yes])
Expand Down Expand Up @@ -1329,12 +1253,3 @@ m4_foreach([adapter], [USB1_ADAPTERS, USB_ADAPTERS, USB0_ADAPTERS,
esac
])
echo

if test $build_ft2232_libftdi = yes -o $build_ft2232_ftd2xx = yes; then
if test $enable_ftdi = no; then
AC_MSG_WARN([Building the deprecated 'ft2232' adapter driver but not its replacement!])
AC_MSG_WARN([Please consider using --enable-ftdi instead.])
else
AC_MSG_WARN([Building the deprecated 'ft2232' adapter driver.])
fi
fi

0 comments on commit cc2d4f0

Please sign in to comment.