1 Building OpenOCD for Windows
2 ----------------------------
4 You can build OpenOCD for Windows natively with either MinGW-w64/MSYS
5 or Cygwin (plain MinGW might work with --disable-werror but is not
6 recommended as it doesn't provide enough C99 compatibility).
7 Alternatively, one can cross-compile it using MinGW-w64 on a *nix
8 host. See README for the generic instructions.
10 Also, the MSYS2 project provides both ready-made binaries and an easy
11 way to self-compile from their software repository out of the box.
13 Native MinGW-w64/MSYS compilation
14 -----------------------------
16 As MSYS doesn't come with pkg-config pre-installed, you need to add it
17 manually. The easiest way to do that is to download pkg-config-lite
20 http://sourceforge.net/projects/pkgconfiglite/
22 Then simply unzip the archive to the root directory of your MinGW-w64
28 For the adapters that use a HID-based protocol, e.g. CMSIS-DAP, you do
29 not need to perform any additional configuration.
31 For all the others you usually need to have WinUSB.sys (or
32 libusbK.sys) driver installed. Some vendor software (e.g. for
33 ST-LINKv2) does it on its own. For the other cases the easiest way to
34 assign WinUSB to a device is to use the latest Zadig installer:
38 When using a composite USB device, it's often necessary to assign
39 WinUSB.sys to the composite parent instead of the specific
40 interface. To do that one needs to activate an advanced option in the
43 If you need to use the same adapter with other applications that may
44 require another driver, a solution for Windows Vista and above is to
45 activate the IgnoreHWSerNum registry setting for the USB device.
47 That setting forces Windows to associate the driver per port instead of
48 per serial number, the same behaviour as when the device does not contain
49 a serial number. So different drivers can be installed for the adapter on
50 different ports and you just need to plug the adapter into the correct
51 port depending on which application to use.
53 For more information, see:
55 https://learn.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-device-specific-registry-settings
56 http://www.ftdichip.com/Support/Knowledgebase/index.html?ignorehardwareserialnumber.htm