From: 陳韋任 <che...@g2...> - 2015-02-11 09:45:01
|
Hi All, I have added hidapi library in Cygwin (cygwin/mingw i686/x86_64 version), and I think it would be much easier to build openocd on Windows. Here is the build flow: ---------------------------------------------------------------------------------------------------------------------- 1. install cygwin 64 bit * http://cygwin.com/setup-x86_64.exe 2. run setup-x86_64.exe to install the following packages: * make * gcc-core * mingw64-x86-64-pkg-config * mingw64-x86-64-gcc-core * mingw64-x86-64-hidapi 3. unzip openocd-0.8.0.tar.gz into your cygwin home directory (C:\cygwin64\home\$(USER)) 4. launch Cygwin64 Terminal $ mkdir install build $ cd build $ ../openocd-0.8.0/configure --host=x86_64-w64-mingw32 --prefix=$HOME/install $ make; make install 5. copy libhidapi-0.dll to the install directory $ cd $HOME/install $ cp /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libhidapi-0.dll . ---------------------------------------------------------------------------------------------------------------------- Note that if you want to build cygwin or mingw64-i686 version openocd, you should install corresponding pkg-config/gcc-core/hidapi, and adjust the "--host" option. If you want to link openocd with libusb, mingw i686/x86_64 libusb can be found by adding cygwinports [1] mirror. Have fun. :-) Regards, chenwj [1] https://sourceware.org/cygwinports/ -- Wei-Ren Chen (陳韋任) Homepage: http://people.cs.nctu.edu.tw/~chenwj |