On Wed, Jul 6, 2011 at 8:16 AM, Rodrigo Rosa <[email protected]> wrote:
> thanks for the bins
> i downloaded:
> http://code.google.com/p/picusb/downloads/detail?name=libftdi-0.19_mingw32.zip&can=2&q=
> http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.4.0/libusb-win32-bin-1.2.4.0.zip/download
>
> and ran the following configure:
> ./configure --enable-mantainer-mode --enable-ft2232_libftdi
> --build=i686-pc-linux-gnu --host=i586-mingw32msvc
>
> and it worked!
> nice!
>
> thanks! :)

Glad that the binary helps!

> one thing though.
> i did
> sudo cp libftdi-0.19_mingw32/include/ftdi.h /usr/i586-mingw32msvc/include/
> sudo cp libftdi-0.19_mingw32/lib/libftdi.* /usr/i586-mingw32msvc/lib/
> sudo cp libusb-win32-bin-1.2.4.0/include/usb.h /usr/i586-mingw32msvc/include/
> sudo cp libusb-win32-bin-1.2.4.0/lib/gcc/libusb.a /usr/i586-mingw32msvc/lib/

Actually that is what I normally do as well. :-)

For MinGW-w64 you have to be careful as well because it has its own
include file usb.h in the default include directory. I tried to argue with
them that their usb.h should be in include\ddk just like MinGW but
they do not accept my arguments.

That is why we actually change usb.h name to a different name
(lusb0_usb.h) after 1.2.4.0 release. (I am one of the admins of libusb-win32).

So in the future, projects using libusb-win32 like libftdi and OpenOCD
may have to change to use the new name.
Eg: 
http://code.google.com/p/libnfc/source/browse/trunk/libnfc/drivers/pn53x_usb.c

#ifndef _WIN32
  // Under POSIX system, we use libusb (>= 0.1.12)
  #include <usb.h>
  #define USB_INFINITE_TIMEOUT   0
  #define _usb_strerror( X ) strerror(-X)
#else
  // Under Windows we use libusb-win32 (>= 1.2.4)
  #include <lusb0_usb.h>
  // libusb-win32's bug workaround: 0 as timeout does not means infite
as expected
  #define USB_INFINITE_TIMEOUT   100
  #define _usb_strerror( X ) usb_strerror()
#endif

(BTW, the anomaly is fixed in 1.2.4.7. The above 100ms time out is
also too short
normally for Windows).
http://sourceforge.net/projects/libusb-win32/files/libusb-win32-snapshots/20110702/

> because running the following did not work:
> ./configure --enable-mantainer-mode --enable-ft2232_libftdi
> --build=i686-pc-linux-gnu --host=i586-mingw32msvc
> --includedir=/home/rrosa/Desktop/libftdi-0.19_mingw32/include/
> --includedir=/home/rrosa/Desktop/libusb-win32-bin-1.2.4.0/include/
> --libdir=/home/rrosa/Desktop/libftdi-0.19_mingw32/lib/
> --libdir=/home/rrosa/Desktop/libusb-win32-bin-1.2.4.0/bin/x86/
>
> what arguments should i give to configure in order to get it to find stuff?
>

After running ./bootstrap, you will get the configure file and then you
can get the help information. The following flags can be added to
help you to use the libusb-win32 and libftdi libraries.

./configure --help

  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>



-- 
Xiaofan
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to