Building OpenOCD from Sources for MacOS¶
The following instructions are alternative to downloading binary OpenOCD from Espressif GitHub. To quickly setup the binary OpenOCD, instead of compiling it yourself, backup and proceed to section Setup of OpenOCD.
Download Sources of OpenOCD¶
The sources for the ESP32-enabled variant of OpenOCD are available from Espressif GitHub under https://github.com/espressif/openocd-esp32. To download the sources, use the following commands:
cd ~/esp git clone --recursive https://github.com/espressif/openocd-esp32.git
The clone of sources should be now saved in
Install packages that are required to compile OpenOCD using Homebrew:
brew install automake libtool libusb wget email@example.com pkg-config
Proceed with configuring and building OpenOCD:
cd ~/esp/openocd-esp32 ./bootstrap ./configure make
Optionally you can add
sudo make install step at the end. Skip it, if you have an existing OpenOCD (from e.g. another development platform), as it may get overwritten.
Should an error occur, resolve it and try again until the command
If there is a submodule problem from OpenOCD, please
openocd-esp32directory and input
git submodule update --init.
./configureis successfully run, information of enabled JTAG will be printed under
OpenOCD configuration summary.
If the information of your device is not shown in the log, use
./configureto enable it as described in
For details concerning compiling OpenOCD, please refer to
make process is successfully completed, the executable of OpenOCD will be saved in