- stlink-v2.1-nrf51.cfg - st-link v2.1 + nrf51
- stlink-v2-nrf51.cfg - st-link v2 + nrf51 (Qunqi Mini ST-link/V2 programmer)
- stlink-v2-stm32f4x.cfg - st-link v2 + stm32f4 (Linaro Carbon board)
- install openocd (apt-get install openocd) or
apt install pkg-config automake libtool
git clone git://git.code.sf.net/p/openocd/code openocd-code
cd openocd-code
./bootstrap
./configure
make
make install
openocd -f [configfilename.cfg]
openocd -f stlink-v2-stm32f4x.cfg -c "program zephyr.hex verify exit"
telnet localhost 4444
program /path/to/hexfile.hex