| 1 |
* How to cross compile libftdi-1.x for Windows? * |
| 2 |
1 - Prepare a pkg-config wrapper according to |
| 3 |
https://autotools.io/pkgconfig/cross-compiling.html , |
| 4 |
additionally export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS and |
| 5 |
PKG_CONFIG_ALLOW_SYSTEM_LIBS. |
| 6 |
2 - Write a CMake toolchain file according to |
| 7 |
http://www.vtk.org/Wiki/CmakeMingw . Change the path to your future sysroot. |
| 8 |
3 - Get libusb sources (either by cloning the git repo or by downloading a |
| 9 |
tarball). Unpack, autogen.sh (when building from git), and configure like this: |
| 10 |
./configure --build=`./config.guess` --host=i686-w64-mingw32 \ |
| 11 |
--prefix=/usr --with-sysroot=$HOME/i686-w64-mingw32-root/ |
| 12 |
4 - run |
| 13 |
make install DESTDIR=$HOME/i686-w64-mingw32-root/ |
| 14 |
5 - go to libftdi-1.x source directory and run |
| 15 |
cmake -DCMAKE_TOOLCHAIN_FILE=~/Toolchain-mingw.cmake \ |
| 16 |
-DCMAKE_INSTALL_PREFIX="/usr" \ |
| 17 |
-DPKG_CONFIG_EXECUTABLE=`which i686-w64-mingw32-pkg-config` |
| 18 |
6 - run |
| 19 |
make install DESTDIR=$HOME/i686-w64-mingw32-root/ |
| 20 |
|
| 21 |
* How to run libftdi 1.x under Windows * |
| 22 |
|
| 23 |
On 26-Jan-2014, libusbx and libusb project were merged with the release |
| 24 |
of libusb-1.0.18 and now the project is called libusb. |
| 25 |
|
| 26 |
libusb Windows backend will need to rely on a proper driver to run. |
| 27 |
Please refer to the following wiki page for proper driver installation. |
| 28 |
https://github.com/libusb/libusb/wiki/Windows#wiki-How_to_use_libusb_on_Windows |
| 29 |
|
| 30 |
As of 26-Jan-2014, libusb Windows backend supports WinUSB, |
| 31 |
libusb0.sys and libusbk.sys driver. However, libusb's support of |
| 32 |
libusb0.sys and libusbk.sys is considered to be less mature than |
| 33 |
WinUSB. Therefore, WinUSB driver installation using Zadig |
| 34 |
is recommended. |
| 35 |
|
| 36 |
Take note once you replace the original FTDI driver with WinUSB driver, |
| 37 |
you can no longer use the functionality the original FTDI driver provides |
| 38 |
(eg. Virtual Serial Port or D2XX). |