-
Notifications
You must be signed in to change notification settings - Fork 2k
OpenOCD
OpenOCD (the open on-chip debugger) is an open source tool for debugging and flashing microcontrollers. In RIOT we try to use this tool for as many platforms as possible to reduce the overhead of having to keep track of many different (and sometimes proprietary) tools.
Many of the boards supported by RIOT use top-edge hardware that is only supported by very recent versions of OpenOCD. The OpenOCD versions that come with Linux distributions (e.g. 0.7.0 in Mint 17) are mostly not up-to-date. For this reason we recommend that you manually build the current upstream version.
The following steps are for building and installing OpenOCD under Linux Mint 17. But this howto should work unchanged also for recent Ubuntu versions. For other Linux distributions the steps have to slightly altered, Windows is TODO.
- Install prerequisites
apt-get install build-essential autoconf automake libtool libusb-dev libusb-1.0-0-dev libhidapi-dev
- Clone the OpenOCD git repository
git clone git://git.code.sf.net/p/openocd/code openocd
- Switch into the directory
cd openocd
- Bootstrap the build envoronment
./bootstrap
- Call configure. Make sure all devices are put to
yes
in the configuration summary
./configure
- Build the thing
make
- Install it
sudo make install
- Test if everything worked out properly
openocd --version
This should give you the version you have just build, probably something like 0.9.0-dev-xxxx
. Voila, thats it!
- Using homebrew one can install the most recent version of openocd by
brew install openocd --HEAD
- Test if everything worked out properly
openocd --version
This should give you the version you have just build, probably something like 0.9.0-dev-xxxx
. Voila, thats it!
To figure out if a board is supported by OpenOCD it's best to a look on the scripts that come with OpenOCD. On Ubuntu/Mint these are put into /usr/local/share/openocd/scripts/
.