How to build current OpenOCD version on Windows - Marus/cortex-debug GitHub Wiki

  1. Download and install MSYS2, strictly follow all step-by-step package install instructions from https://www.msys2.org
  2. Run MSYS2 MSYS app and:
    • install LIBUSB package: pacman -S mingw-w64-x86_64-libusb
    • install Git package: pacman -S git
  3. Run MSYS2 MinGW 64-bit app and execute:
    • git ls-remote --tags git://git.code.sf.net/p/openocd/code
      to find the latest (pre)released OpenOCD version
    • git clone --depth 1 --branch v0.11.0 git://git.code.sf.net/p/openocd/code
      replace v0.11.0 with the version you would like to build,
      omit the --branch <tag> part to get daily build version
    • cd code
    • ./bootstrap
    • contrib/cross-build.sh
  4. Build output can be found in the code/-root/usr directory.
  5. Download libusb from https://libusb.info, from the archive file copy VS2015-x64\dll\libusb-1.0.dll to the folder containing just built openocd.exe
⚠️ **GitHub.com Fallback** ⚠️