1 Building OpenOCD for macOS
2 --------------------------
4 There are a few prerequisites you will need first:
6 - Xcode (install from the AppStore)
7 - Command Line Tools (install from Xcode -> Preferences -> Downloads)
8 - Gentoo Prefix (http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap.xml)
10 - Homebrew (http://mxcl.github.io/homebrew/)
12 - MacPorts (http://www.macports.org/install.php)
15 If you're building manually you need Texinfo version 5.0 or later. The
16 simplest way to get it is to use Homebrew (brew install texinfo) and
17 then ``export PATH=/usr/local/opt/texinfo/bin:$PATH``.
20 With Gentoo Prefix you can build the release version or the latest
21 devel version (-9999) the usual way described in the Gentoo
22 documentation. Alternatively, install the prerequisites and build
23 manually from the sources.
26 With Homebrew you can either run:
27 brew install [--HEAD] openocd (where optional --HEAD asks brew to
28 install the current git version)
30 brew install libtool automake libusb [hidapi] [libftdi]
31 (to install the needed dependencies and then proceed with the
32 manual building procedure)
35 For building with MacPorts you need to run:
36 sudo port install libtool automake autoconf pkgconfig \
39 You should also specify LDFLAGS and CPPFLAGS to allow configure to use
40 MacPorts' libraries, so run configure like this:
41 LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include ./configure [options]
44 See README for the generic building instructions.
46 If you're using a USB adapter and have a driver kext matched to it,
47 you will need to unload it prior to running OpenOCD. E.g. with Apple
48 driver (OS X 10.9 or later) for FTDI run:
49 sudo kextunload -b com.apple.driver.AppleUSBFTDI
50 for FTDI vendor driver use:
51 sudo kextunload FTDIUSBSerialDriver.kext
53 To learn more on the topic please refer to the official libusb FAQ:
54 https://github.com/libusb/libusb/wiki/FAQ