From 0b70d55d2a9e44cb297246cf48992f048ace90e3 Mon Sep 17 00:00:00 2001
From: Sam Calisch <sam.calisch@cba.mit.edu>
Date: Sat, 29 Jul 2017 14:56:31 -0400
Subject: [PATCH] Update README.md

---
 README.md | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/README.md b/README.md
index 9a97a9b..ee898fc 100644
--- a/README.md
+++ b/README.md
@@ -34,6 +34,8 @@ Below is a custom board using the Raytac module.  It is designed to use a serial
 <img src='raytac-ftdi/raytac-nrf-ftdi-layout.png' width=60%>
 
 
+Making a custom board requires programming via Serial Wire Debug (SWD), at least for the bootloader.  Two methods for this are described below.
+
 
 ## Programming with Segger J-Link
 
@@ -57,6 +59,25 @@ You don't have to spend hundreds on a J-Link (even though it is very nice).  Usi
 <img src='openocd/bootloader-raspberrypi.jpg' width=53%>
 <img src='openocd/flashing-bootloader.png' width=30%>
 
+<a href='https://learn.adafruit.com/programming-microcontrollers-using-openocd-on-raspberry-pi/overview'>This page</a> is a very helpful introduction to programming using OpenOCD and the BCM2835.  
+
 Support for the NRF52 is not in the stable release of OpenOCD as of V 0.10, but you can patch it following the instructions on <a href='https://primalcortex.wordpress.com/2017/06/10/setting-up-openocd-for-programming-the-nordic-nrf52832-chip/'>this page</a>.  They worked for me, with the small addition that I needed to eliminate two duplicate variable definitions that broke my build.
 
+The `openocd.cfg` will also be different for the NRF52.  Here is mine for flashing a binary of the Adafruit bootloader:
+```
+transport select swd
+source [find target/nrf52.cfg]
+bcm2835gpio_swd_nums 25 24
+bcm2835gpio_trst_num 7
+bcm2835gpio_srst_num 18
+ 
+init
+targets
+reset halt
+nrf52 mass_erase 0
+program feather52_bootloader_v050_s132_v201.hex verify
+reset
+shutdown
+```
+
 
-- 
GitLab