mirror of
git://git.code.sf.net/p/openocd/code
synced 2025-07-19 19:47:53 +10:00
An alternative approach to show how much cleaner the pure pkg-config way is. This changes the discovery procedures for libusb-1.0 and libusb-0.1, making them depend on pkg-config being properly installed and configured, including the necessary build host configuration for the cross-builds (see http://www.flameeyes.eu/autotools-mythbuster/pkgconfig/cross-compiling.html) It should make it possible to compile OpenOCD without changes and extra effort on GNU/Linux, FreeBSD users would need to supply a .pc file for their libusb implementation or add LIBUSB1_LIBS and LIBUSB1_CFLAGS to the configure environment. Change-Id: I826e378dd1e0d101a549a573b2c63212a7e00b64 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1467 Reviewed-by: Xiaofan <xiaofanc@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Tested-by: Spencer Oliver <spen@spen-soft.co.uk>
33 lines
1.0 KiB
Plaintext
33 lines
1.0 KiB
Plaintext
Building OpenOCD for Windows
|
|
----------------------------
|
|
|
|
You can build OpenOCD for Windows natively with either MinGW/MSYS or
|
|
Cygwin. Alternatively, one can cross-compile it using MinGW on a *nix
|
|
host. See README for the generic instructions.
|
|
|
|
Native MinGW/MSYS compilation
|
|
-----------------------------
|
|
|
|
As MSYS doesn't come with pkg-config pre-installed, you need to add it
|
|
manually. The easiest way to do that is to download pkg-config-lite
|
|
from:
|
|
|
|
http://sourceforge.net/projects/pkgconfiglite/
|
|
|
|
Then simply unzip the archive to the root directory of your MSYS
|
|
installation.
|
|
|
|
USB adapters
|
|
------------
|
|
|
|
You usually need to have WinUSB.sys (or libusbK.sys) driver installed
|
|
for a USB-based adapter. Some vendor software (e.g. for ST-LINKv2)
|
|
does it on its own. For the other cases the easiest way to assign
|
|
WinUSB to a device is to use the Zadig installer:
|
|
|
|
http://sourceforge.net/projects/libwdi/files/zadig/
|
|
|
|
For the old drivers that use libusb-0.1 API you might need to link
|
|
against libusb-win32 headers and install the corresponding driver with
|
|
Zadig.
|