If you are trying to install OpenOCD with CMSIS-DAP support on Mac OS and having trouble, this Gist may be for you :)
checking for HIDAPI... no
checking for HIDAPI... no
checking for HIDAPI... no
checking for LIBFTDI... no
checking for LIBFTDI... no
checking for LIBJAYLINK... no
configure: error: hidapi is required for the CMSIS-DAP Compliant Debugger
$ git clone git://github.com/Dashlane/hidapi.git
$ cd hidapi
// NOTE: the following line may be omitted if you want to try a different version than I used
hidapi $ git checkout b00982f
hidapi $ ./bootstrap
hidapi $ ./configure --enable-static --disable-shared
hidapi $ make clean
hidapi $ make
hidapi $ export HIDAPI_LIBS="-L`pwd`/mac/.libs/ -lhidapi"
hidapi $ export PKG_CONFIG_PATH="`pwd`/pc/"
hidapi $ echo $HIDAPI_LIBS
<copy_this_path_for_later> <--------------------------------- COPY!!!
hidapi $ echo $PKG_CONFIG_PATH
<copy_this_path_for_later> <--------------------------------- COPY!!!
Seems gross to copy the path directly, but trust me it doesn't work unless you do
Download https://sourceforge.net/projects/openocd/files/openocd/0.10.0/
$ cd openocd/openocd-0.10.0
openocd-0.10.0 $ HIDAPI_LIBS="<path_copied_before>" PKG_CONFIG_PATH="<path_copied_before>" ./configure --enable-cmsis-dap --disable-werror
e.g. openocd-0.10.0 $ HIDAPI_LIBS="-L/Users/brett/code/openocd/hidapi/mac/.libs/ -lhidapi" PKG_CONFIG_PATH="/Users/brett/code/openocd/hidapi/pc/" ./configure --enable-cmsis-dap --disable-werror
openocd-0.10.0 $ make clean
openocd-0.10.0 $ make install
// this should end with `done`
// check in a new tab
$ which openocd
/usr/local/bin/openocd
$ ls -l /usr/local/bin/openocd
< make sure it's today's date! >
openocd-0.10.0 $ openocd -f interface/cmsis-dap.cfg
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : CMSIS-DAP: SWD Supported
Error: CMSIS-DAP: JTAG not supported
openocd-0.10.0 $ openocd -f interface/cmsis-dap.cfg -f target/stm32f2x.cfg -c "\$_TARGETNAME configure -rtos FreeRTOS"
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
none separate
cortex_m reset_config sysresetreq
Info : CMSIS-DAP: SWD Supported
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : CMSIS-DAP: FW Version = 1.0
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x2ba01477
Info : stm32f2x.cpu: hardware has 6 breakpoints, 4 watchpoints
Hey bud that helped out greatly. I ended up needing to do a lot of code debugging, due to fall throughs etc. I am going to post the changes that I made to the openOCD files.