Commit | Line | Data |
---|---|---|
161206ce | 1 | * How to cross compile libftdi-1.x for Windows? * |
6b27ee49 PF |
2 | 1 - Prepare a pkg-config wrapper according to |
3 | https://www.flameeyes.eu/autotools-mythbuster/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/ | |
161206ce XC |
20 | |
21 | * How to run libftdi-1.x under Windows * | |
22 | ||
23 | libusbx (or libusb-1.0) Windows backend will rely on a proper driver to run. | |
24 | Please refer to the following wiki page on the instruction of | |
25 | installation of the proper driver. | |
26 | https://github.com/libusbx/libusbx/wiki/Windows-Backend#wiki-How_to_use_libusbx_on_Windows | |
27 | ||
28 | As of Jan 09 2013, libusb-1.0 Windows backend only supports WinUSB | |
29 | and libusbx's support of libusb0.sys and libusbk.sys are considered less | |
30 | mature than WinUSB. Therefore, WinUSB driver installation using Zadig | |
31 | is recommended. | |
32 | ||
33 | Take note once you replace the original FTDI driver with WinUSB driver, | |
34 | you can no longer use the functionality the original FTDI driver provides | |
35 | (eg. Virtual Serial Port or D2XX). |