Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

openocd build for Mac Users #5

Closed
citizenfish opened this issue Mar 13, 2021 · 3 comments
Closed

openocd build for Mac Users #5

citizenfish opened this issue Mar 13, 2021 · 3 comments

Comments

@citizenfish
Copy link

citizenfish commented Mar 13, 2021

Firstly thanks for all the good work here

Just wanted to add some extra notes for Mac users following your openocd build notes

If you get the error:-

configure: error: hidapi is required for the CMSIS-DAP Compliant Debugger

Then take the following steps:-

git clone https://github.com/signal11/hidapi.git
cd hidapi
./bootstrap
./configure --enable-static --disable-shared
make

export HIDAPI_LIBS="-L`pwd`/mac/.libs -lhidapi"
export PKG_CONFIG_PATH="`pwd`/pc"

Then change back to the openocd directory and configure as per your instructions.
The environment variables above will ensure that hidapi is found and linked.

@citizenfish citizenfish changed the title openocd build for OSX Users openocd build for Mac Users Mar 13, 2021
@majbthrd
Copy link
Owner

That is much appreciated! I have revised howto/openocd.md to link to this page.

@frederikvs
Copy link

FYI : on my Mac I've also had to change the config command for openocd to

./configure --enable-cmsis-dap CFLAGS="-Wno-deprecated -Wno-strict-prototypes"

Apparently the compiler on some Macs is more sensitive to certain types of warnings.

@ZontarOne
Copy link

ZontarOne commented Jun 19, 2021

I also had to include hidapi headers before configuring openocd:

 export HIDAPI_CFLAGS="-I /`pwd`/hidapi"

then ./configure ... openocd works.

Before compiling with make I had to install texinfo

brew install texinfo
export PATH="/usr/local/opt/texinfo/bin:$PATH"

and run make -j8 again.
Then it works without errors.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants