1 Building OpenOCD for OSX
2 ------------------------
4 There are a few prerequisites you will need first:
6 - Xcode 5 (install from the AppStore)
7 - Command Line Tools (install from Xcode 5 -> 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 With Gentoo Prefix you can build the release version or the latest
16 devel version (-9999) the usual way described in the Gentoo
17 documentation. Alternatively, install the prerequisites and build
18 manually from the sources.
21 With Homebrew you can either run:
22 brew install [--HEAD] openocd (where optional --HEAD asks brew to
23 install the current git version)
25 brew install libtool automake libusb [libusb-compat] [hidapi] [libftdi]
26 (to install the needed dependencies and then proceed with the
27 manual building procedure)
30 For building with MacPorts you need to run:
31 sudo port install libtool automake autoconf pkgconfig \
32 libusb [libusb-compat] [libftdi1]
34 You should also specify LDFLAGS and CPPFLAGS to allow configure to use
35 MacPorts' libraries, so run configure like this:
36 LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include ./configure [options]
39 See README for the generic building instructions.
41 If you're using a USB adapter and have a driver kext matched to it,
42 you will need to unload it prior to running OpenOCD. E.g. with Apple
43 driver (OS X 10.9 or later) for FTDI run:
44 sudo kextunload -b com.apple.driver.AppleUSBFTDI
45 for FTDI vendor driver use:
46 sudo kextunload FTDIUSBSerialDriver.kext
48 To learn more on the topic please refer to the official libusb FAQ:
49 https://github.com/libusb/libusb/wiki/FAQ