OpenOCD + patches for nRF52
https://embedwerks.iotaware.xyz/openocd.html
Tested on Raspbian Stretch on a Raspberry Pi 3 with an ST-Link v2 purchased from Adafruit.com. nRF52832 was on the Adafruit Feather nRF52 dev board.
- Install git, autoconf, and libusb-1.0.0-dev
- Clone the st-link repository: git clone https://github.com/texane/stlink
- cd stlink
- ./autogen.sh
- ./configure
- make
- Once st-link has compiled, copy the binaries and udev rules with the following:
- sudo cp st-* /usr/bin
- find . -name "*.rules"
- sudo cp ./etc/udev/rules.d/49-stlinkv2.rules /etc/udev/rules.d
- Apply the udev rules with the following:
- sudo udevadm control --reload-rules
- sudo udevadm trigger
- Verify the ST-Link shows up via dmesg
- Download and unzip the openocd zip, once unzipped run the following:
- cd openocd_nrf52_patched
- ./bootstap
- ./configure
- make
- sudo make install
- Once installed, download the config file and S132 SoftDevice then run the following (must be in working directory):
- openocd -f openocd_nrf52.cfg
- The SoftDevice will be programmed and you should see no errors
- To program your app logic just add 'program yourapp.hex verify' under the SoftDevice programming line in openocd_nrf52.cfg
Open an issue here