I have now resolved the issue preventing OpenOCD and the Olimex ARM-USB-OCD from working under OS X.
Turns out that the FTDI driver explicitly includes the Olimex vendor/product IDs and loads serial drivers for the two devices there-in. This prevents OpenOCD from claiming the same ports. Since I have no need to directly access these serial ports, they can be disabled.
One (sledgehammer) way of doing this is to simply unload the FTDI kernal driver.
sudo kextunload -bundle com.FTDI.driver.FTDIUSBSerialDriver
Try that as a first test, to see if openocd
will run now. It should. If not, you may be using the Apple FTDI driver. You can probably find out the name of the driver by running ...
sudo kextstat | grep FTDI
If unloading the FTDI kernal extension (driver) works, then we're almost there. The problem now is that none of your other FTDI USB devices will work. Luckily, we are able to disable only the Olimex serial device needed by openocd
...
sudo vi /System/Library/Extensions/FTDIUSBSerialDriver.kext/Contents/Info.plist
In that file, we find the Olimex keys and comment them out ...
<integer>1027</integer> </dict> <!-- <key>Olimex OpenOCD JTAG A</key> <dict> <key>CFBundleIdentifier</key> <string>com.FTDI.driver.FTDIUSBSerialDriver</string> <key>IOClass</key> <string>FTDIUSBSerialDriver</string> <key>IOProviderClass</key> <string>IOUSBInterface</string> <key>bConfigurationValue</key> <integer>1</integer> <key>bInterfaceNumber</key> <integer>0</integer> <key>idProduct</key> <integer>3</integer> <key>idVendor</key> <integer>5562</integer> </dict> --> <key>Olimex OpenOCD JTAG B</key> <dict> <key>CFBundleIdentifier</key> <string>com.FTDI.driver.FTDIUSBSerialDriver</string>
The <--
... -->
part is the commented out section.
Now unload and reload the kernel extension, to make the changes take effect ...
sudo kextunload -bundle com.FTDI.driver.FTDIUSBSerialDriver sudo kextload -bundle com.FTDI.driver.FTDIUSBSerialDriver
NOTE: The Olimex ARM-USB-OCD has two serial devices. One is available externally on a DB9 connector. OpenOCD only uses the first port, which is why we only commented out the first of the two ports in the FTDI driver Info.plist
file, above. This lets you still have access to the DB9 serial port.
You should now still be able to use openocd
, while at the same time having the use of any other FTDI USB devices you may have plugged in -- including the DB9 serial port exposed on the Olimex OCD, which shows up on my system as /dev/cu.usbserial-FTWZWBC0B
.