diff --git a/jtag/ChangeLog b/jtag/ChangeLog index e17f4d19..39c1d524 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,8 +1,14 @@ +2008-02-04 Kolja Waschk + + * configure.ac, src/tap/parport/xpcu_common.c, src/tap/parport_xpcu_pp.c, + doc/UrJTAG.txt: Minor fixes regarding bug [1875234] "Can't compile + UrJTAG with libusb on Cygwin" + 2008-02-03 Kolja Waschk * src/flash/amd.c: Not only bus width but also device geometry affects the address shift ([1869650] Improve flash detection and support) - * src/tap/tap.c, src/tap/chain.c: Split tap_shift_register into two + * src/tap/tap.c, src/tap/chain.c: Split tap_shift_register into two halves, one that queues transfers, another that picks up the results. ([1832990] Speed improvements for USB cables) esp. for long chains diff --git a/jtag/configure.ac b/jtag/configure.ac index aa266409..3ac2b666 100644 --- a/jtag/configure.ac +++ b/jtag/configure.ac @@ -150,7 +150,14 @@ AC_ARG_WITH([libusb], AS_IF([test "x$with_libusb" != xno], [ AS_IF([test "x$with_libusb" != xyes -a "x$with_libusb" != xcheck], [ - CFLAGS="$CFLAGS -I$with_libusb -L$with_libusb" + case $host in + *cygwin*) + CFLAGS="$CFLAGS -I$with_libusb/include -L$with_libusb/lib/gcc" + ;; + *) + CFLAGS="$CFLAGS -I$with_libusb -L$with_libusb" + ;; + esac LIBS="$LIBS -lusb" ],[ AC_PATH_PROG(LIBUSB_CONFIG, libusb-config, no) diff --git a/jtag/doc/UrJTAG.txt b/jtag/doc/UrJTAG.txt index 94969c25..466a4e1c 100644 --- a/jtag/doc/UrJTAG.txt +++ b/jtag/doc/UrJTAG.txt @@ -313,6 +313,9 @@ There is a libusb-win32 variant that can be used in a Cygwin environment: * http://libusb.sourceforge.net (libusb) * http://libusb-win32.sourceforge.net (libusb for Windows) +For specific notes regarding the use of these libraries in a Cygwin +environmen, see below. + ==== Installing from source tar.gz ==== The installation follows the standard configure, make, make install scheme: @@ -346,7 +349,7 @@ Unzip the archive and copy _only_ the two files "ftd2xx.h" and this directory for $FTDIDIR in the following example...). Then run configure like this: - CFLAGS="-I$FTDIDIR -L$FTDIDIR" ./configure + CFLAGS="-I$FTDIDIR" LDFLAGS="-L$FTDIDIR" ./configure Configure should now report @@ -356,6 +359,19 @@ Configure should now report via libftdi : no via libftd2xx : yes + +==== Using LibUSB-Win32 in Cygwin environment ==== + +Before running configure, install the LibUSB-Win32 "filter" driver from SF. + + * http://libusb-win32.sourceforge.net + +Then point configure to the directory where LibUSB-Win32 was installed (it +might give problems if the path contains spaces, as "Program Files" does!): + + ./configure --with-libusb="/cygdrive/c/Programme/LibUSB-Win32/" + + ==== Building the BSDL subsystem ==== As mentioned above, building the BSDL lexer requires Flex 2.5.33 or newer. If diff --git a/jtag/src/tap/parport/xpcu_common.c b/jtag/src/tap/parport/xpcu_common.c index b8266f32..f0afb8bb 100644 --- a/jtag/src/tap/parport/xpcu_common.c +++ b/jtag/src/tap/parport/xpcu_common.c @@ -29,7 +29,11 @@ #ifdef HAVE_LIBUSB #include +#if __CYGWIN__ +#include +#else #include +#endif #include #include #ifdef HAVE_STROPTS_H diff --git a/jtag/src/tap/parport/xpcu_pp.c b/jtag/src/tap/parport/xpcu_pp.c index 9513cc50..c4ac56df 100644 --- a/jtag/src/tap/parport/xpcu_pp.c +++ b/jtag/src/tap/parport/xpcu_pp.c @@ -29,7 +29,11 @@ #ifdef HAVE_LIBUSB #include +#if __CYGWIN__ +#include +#else #include +#endif #include #include #ifdef HAVE_STROPTS_H