diff --git a/openocd/README.md b/openocd/README.md index 0c2287d67e989e09acffbdbf1c1bb2658fc11ddf..c2f67de1d176cb7a914e1f1f85cbcecefe1e5561 100644 --- a/openocd/README.md +++ b/openocd/README.md @@ -36,9 +36,10 @@ is on SourceForge. ```git clone https://git.code.sf.net/p/openocd/code openocd-code``` -To build it, you'll need `gcc` or `clang`, as well as `make`, `libtool`, `pkg-config` version 0.23 +To build it, you'll need `gcc`, as well as `make`, `libtool`, `pkg-config` version 0.23 or greater, and possibly others detailed [here](http://openocd.org/doc-release/README). Once you -have the prereqs, building is a standard process. Just note that you need to enable cmsis-dap, which is the protocol your computer will use to communicate with an ATMEL ICE debugger. +have the prereqs, building is a standard process. Just note that you need to enable cmsis-dap, +which is the protocol your computer will use to communicate with an ATMEL ICE debugger. ``` ./bootstrap @@ -47,6 +48,15 @@ make make install ``` +Compiler note: you should be able to use `clang`, but it doesn't seem to work (at least on Mac). +I get the following error: + +``` +src/flash/nor/nrf5.c:613:5: error: format specifies type 'unsigned short' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat] +``` +To fix it, tell the configuration script to use gcc: `/configure --enable-cmsis-dap CC=gcc-8` (or whatever gcc you have installed). +Note that the default `gcc` command on Mac is not actually `gcc`; it's `clang`. So you'll have to install it if you haven't already. + ### Additional Setup You'll almost certainly end up needing a handful of other helpful tools. Depending on your other