I am try to program or upload code to a nrf51822 breakout board using st link v2 mini with openocd. I have been following the blog post tutorial of http://icarus-sensors.github.io/general/starting-with-nRF51822.html. However, i couldnt get the connect to the device using openocd. Error message is attached below. Any idea what is wrong? Or, is that any other easy way i can program the nrf51?
openocd -f interface/stlink-v2.cfg -f target/nrf51.cfg
GNU ARM Eclipse 64-bits Open On-Chip Debugger 0.9.0-00073-gdd34716-dirty (2015-05-19-09:55) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : auto-selecting first available session transport "hla_swd". To override use 'transport select '. Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD adapter speed: 1000 kHz Info : Unable to match requested speed 1000 kHz, using 950 kHz Info : Unable to match requested speed 1000 kHz, using 950 kHz Info : clock speed 950 kHz Info : STLINK v2 JTAG v25 API v2 SWIM v4 VID 0x0483 PID 0x3748 Info : using stlink api v2 Info : Target voltage: 3.268965 Error: init mode failed (unable to connect to the target) in procedure 'init' in procedure 'ocd_bouncer'
nrf51822 breakout : http://www.newegg.com/Product/Product.aspx?Item=9SIA7BF37Z1712&nm_mc=OTC-Froogle&cm_mmc=OTC-Froogle--Gadgets--Srad+Tech-_-9SIA7BF37Z1712
st link v2 mini : http://www.electrodragon.com/product/st-link-v2-programmer-for-stm8-stm32/