Last active
July 6, 2023 22:56
-
-
Save matdombrock/ea3e7478b8705dbac01687147ae6120c to your computer and use it in GitHub Desktop.
Install openocd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Downloads builds and install openocd for m1 macs | |
# | |
#install additional brew libraries | |
brew install libtool automake texinfo wget gcc pkg-config libusb | |
# some path magic so compilers know where to look for stuff | |
export PATH="$(brew --prefix)/opt/texinfo/bin:$PATH" | |
# download openocd files with picoprobe branch | |
git clone https://github.com/raspberrypi/openocd.git \ | |
--branch picoprobe --depth=1 | |
cd openocd | |
./bootstrap | |
# this enables the picoprobe and deactivates other modules that fail to compile otherwise | |
#CAPSTONE_CFLAGS="-I$(brew --prefix)/include" \ | |
# ./configure --prefix="$(brew --prefix)" \ | |
# --enable-picoprobe --disable-presto --disable-werror --disable-openjtag | |
CAPSTONE_CFLAGS="-I/opt/homebrew/Cellar/capstone/4.0.2/include/capstone -I/opt/homebrew/include" ./configure \ | |
--enable-picoprobe --disable-presto --disable-openjtag --disable-werror | |
make -j4 | |
# this will probably overwrite your current installation | |
# and will break openjtag | |
make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment