Skip to content

Commit 68e5041

Browse files
committed
openocd: drop dependency from libusb0
Now that the old drivers have been converted to libusb1, there is no need to keep the build dependency from libusb0. Drop libusb0 from configure and makefiles, remove the libusb0 helper and remove libusb0 and libusb-compat from the README files. Change-Id: Icc05be74ae5971ba6cbb67d39107c709a4d826e6 Signed-off-by: Antonio Borneo <[email protected]> Reviewed-on: http://openocd.zylin.com/5993 Tested-by: jenkins
1 parent ef41652 commit 68e5041

File tree

8 files changed

+5
-108
lines changed

8 files changed

+5
-108
lines changed

README

+1-2
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,7 @@ Additionally, for building from git:
224224
- automake >= 1.14
225225
- texinfo >= 5.0
226226

227-
USB-based adapters depend on libusb-1.0 and some older drivers require
228-
libusb-0.1 or libusb-compat-0.1. A compatible implementation, such as
227+
USB-based adapters depend on libusb-1.0. A compatible implementation, such as
229228
FreeBSD's, additionally needs the corresponding .pc files.
230229

231230
USB-Blaster, ASIX Presto and OpenJTAG interface adapter

README.Windows

-4
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ WinUSB.sys to the composite parent instead of the specific
4040
interface. To do that one needs to activate an advanced option in the
4141
Zadig installer.
4242

43-
For the old drivers that use libusb-0.1 API you might need to link
44-
against libusb-win32 headers and install the corresponding driver with
45-
Zadig.
46-
4743
If you need to use the same adapter with other applications that may
4844
require another driver, a solution for Windows Vista and above is to
4945
activate the IgnoreHWSerNum registry setting for the USB device.

README.macOS

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ With Homebrew you can either run:
2727
brew install [--HEAD] openocd (where optional --HEAD asks brew to
2828
install the current git version)
2929
or
30-
brew install libtool automake libusb [libusb-compat] [hidapi] [libftdi]
30+
brew install libtool automake libusb [hidapi] [libftdi]
3131
(to install the needed dependencies and then proceed with the
3232
manual building procedure)
3333

3434

3535
For building with MacPorts you need to run:
3636
sudo port install libtool automake autoconf pkgconfig \
37-
libusb [libusb-compat] [libftdi1]
37+
libusb [libftdi1]
3838

3939
You should also specify LDFLAGS and CPPFLAGS to allow configure to use
4040
MacPorts' libraries, so run configure like this:

configure.ac

+1-9
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@ m4_define([USB1_ADAPTERS],
127127
[[usbprog], [USBProg JTAG Programmer], [USBPROG]],
128128
[[aice], [Andes JTAG Programmer], [AICE]]])
129129

130-
m4_define([USB0_ADAPTERS],
131-
[])
132-
133130
m4_define([HIDAPI_ADAPTERS],
134131
[[[cmsis_dap], [CMSIS-DAP Compliant Debugger], [CMSIS_DAP_HID]],
135132
[[nulink], [Nu-Link Programmer], [HLADAPTER_NULINK]]])
@@ -249,7 +246,6 @@ m4_define([AC_ARG_ADAPTERS], [
249246

250247
AC_ARG_ADAPTERS([
251248
USB1_ADAPTERS,
252-
USB0_ADAPTERS,
253249
HIDAPI_ADAPTERS,
254250
HIDAPI_USB1_ADAPTERS,
255251
LIBFTDI_ADAPTERS,
@@ -585,8 +581,6 @@ PKG_CHECK_MODULES([LIBUSB1], [libusb-1.0], [
585581
AC_MSG_WARN([libusb-1.x not found, trying legacy libusb-0.1 as a fallback; consider installing libusb-1.x instead])
586582
])
587583

588-
PKG_CHECK_MODULES([LIBUSB0], [libusb], [use_libusb0=yes], [use_libusb0=no])
589-
590584
AC_ARG_WITH([capstone],
591585
AS_HELP_STRING([--with-capstone], [Use Capstone disassembly library (default=auto)])
592586
, [
@@ -648,7 +642,6 @@ m4_define([PROCESS_ADAPTERS], [
648642
])
649643

650644
PROCESS_ADAPTERS([USB1_ADAPTERS], ["x$use_libusb1" = "xyes"], [libusb-1.x])
651-
PROCESS_ADAPTERS([USB0_ADAPTERS], ["x$use_libusb0" = "xyes"], [libusb-0.1])
652645
PROCESS_ADAPTERS([HIDAPI_ADAPTERS], ["x$use_hidapi" = "xyes"], [hidapi])
653646
PROCESS_ADAPTERS([HIDAPI_USB1_ADAPTERS], ["x$use_hidapi" = "xyes" -a "x$use_libusb1" = "xyes"], [hidapi and libusb-1.x])
654647
PROCESS_ADAPTERS([LIBFTDI_ADAPTERS], ["x$use_libftdi" = "xyes"], [libftdi])
@@ -705,7 +698,6 @@ AM_CONDITIONAL([REMOTE_BITBANG], [test "x$build_remote_bitbang" = "xyes"])
705698
AM_CONDITIONAL([BUSPIRATE], [test "x$build_buspirate" = "xyes"])
706699
AM_CONDITIONAL([SYSFSGPIO], [test "x$build_sysfsgpio" = "xyes"])
707700
AM_CONDITIONAL([XLNX_PCIE_XVC], [test "x$build_xlnx_pcie_xvc" = "xyes"])
708-
AM_CONDITIONAL([USE_LIBUSB0], [test "x$use_libusb0" = "xyes"])
709701
AM_CONDITIONAL([USE_LIBUSB1], [test "x$use_libusb1" = "xyes"])
710702
AM_CONDITIONAL([IS_CYGWIN], [test "x$is_cygwin" = "xyes"])
711703
AM_CONDITIONAL([IS_MINGW], [test "x$is_mingw" = "xyes"])
@@ -784,7 +776,7 @@ echo
784776
echo
785777
echo OpenOCD configuration summary
786778
echo --------------------------------------------------
787-
m4_foreach([adapter], [USB1_ADAPTERS, USB0_ADAPTERS,
779+
m4_foreach([adapter], [USB1_ADAPTERS,
788780
HIDAPI_ADAPTERS, HIDAPI_USB1_ADAPTERS, LIBFTDI_ADAPTERS,
789781
LIBFTDI_USB1_ADAPTERS,
790782
LIBGPIOD_ADAPTERS,

src/jtag/aice/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
noinst_LTLIBRARIES += %D%/libocdaice.la
22

3-
%C%_libocdaice_la_CPPFLAGS = -I$(top_srcdir)/src/jtag/drivers $(AM_CPPFLAGS) $(LIBUSB1_CFLAGS) $(LIBUSB0_CFLAGS)
3+
%C%_libocdaice_la_CPPFLAGS = -I$(top_srcdir)/src/jtag/drivers $(AM_CPPFLAGS) $(LIBUSB1_CFLAGS)
44
%C%_libocdaice_la_SOURCES = \
55
%D%/aice_transport.c \
66
%D%/aice_interface.c \

src/jtag/drivers/Makefile.am

-7
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@ DRIVERFILES += %D%/libusb_helper.c
2727
%C%_libocdjtagdrivers_la_LIBADD += $(LIBUSB1_LIBS)
2828
endif
2929

30-
if USE_LIBUSB0
31-
DRIVERFILES += %D%/usb_common.c
32-
%C%_libocdjtagdrivers_la_CPPFLAGS += $(LIBUSB0_CFLAGS)
33-
%C%_libocdjtagdrivers_la_LIBADD += $(LIBUSB0_LIBS)
34-
endif
35-
3630
if USE_LIBFTDI
3731
%C%_libocdjtagdrivers_la_CPPFLAGS += $(LIBFTDI_CFLAGS)
3832
%C%_libocdjtagdrivers_la_LIBADD += $(LIBFTDI_LIBS)
@@ -203,7 +197,6 @@ DRIVERHEADERS = \
203197
%D%/rlink_dtc_cmd.h \
204198
%D%/rlink_ep1_cmd.h \
205199
%D%/rlink_st7.h \
206-
%D%/usb_common.h \
207200
%D%/versaloon/usbtoxxx/usbtoxxx.h \
208201
%D%/versaloon/usbtoxxx/usbtoxxx_internal.h \
209202
%D%/versaloon/versaloon.h \

src/jtag/drivers/usb_common.c

-57
This file was deleted.

src/jtag/drivers/usb_common.h

-26
This file was deleted.

0 commit comments

Comments
 (0)