2013-09-11 16:05:16 -05:00
|
|
|
Building OpenOCD for OSX
|
|
|
|
------------------------
|
|
|
|
|
|
|
|
There are a few prerequisites you will need first:
|
|
|
|
|
|
|
|
- Xcode 4 (install from the AppStore)
|
|
|
|
- Command Line Tools (install from Xcode 4 -> Preferences -> Downloads)
|
|
|
|
- MacPorts (http://www.macports.org/install.php)
|
|
|
|
or
|
|
|
|
- Homebrew (http://mxcl.github.io/homebrew/)
|
|
|
|
|
2013-09-11 16:07:59 -05:00
|
|
|
libtool, automake, autoconf, pkg-config and libusb can be easily
|
|
|
|
installed via MacPorts:
|
|
|
|
sudo port install libtool automake autoconf pkgconfig libusb [libusb-compat]
|
2013-09-11 16:05:16 -05:00
|
|
|
or with Homebrew:
|
2014-01-17 05:25:53 -06:00
|
|
|
brew install libtool automake libusb [libusb-compat] [hidapi]
|
2013-09-11 16:05:16 -05:00
|
|
|
|
|
|
|
You should also specify LDFLAGS and CPPFLAGS to allow configure to use
|
|
|
|
MacPorts' libraries, so run configure like this:
|
|
|
|
LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include ./configure [options]
|
|
|
|
|
|
|
|
If you're using Homebrew, no custom flags are necessary.
|
|
|
|
|
|
|
|
See README for the generic building instructions.
|
|
|
|
|
2014-03-31 12:23:22 -05:00
|
|
|
If you're using a USB adapter and have a driver kext matched to it,
|
|
|
|
you will need to unload it prior to running OpenOCD. E.g. with Apple
|
|
|
|
driver (OS X 10.9 or later) for FTDI run:
|
|
|
|
sudo kextunload -b com.apple.driver.AppleUSBFTDI
|
|
|
|
for FTDI vendor driver use:
|
2013-09-11 16:05:16 -05:00
|
|
|
sudo kextunload FTDIUSBSerialDriver.kext
|
2014-03-31 12:23:22 -05:00
|
|
|
|
|
|
|
To learn more on the topic please refer to the official libusb FAQ:
|
|
|
|
https://github.com/libusb/libusb/wiki/FAQ
|