Commit 0b70d55d authored by Sam Calisch's avatar Sam Calisch
Browse files

Update README.md

parent f8bc634e
Pipeline #570 canceled with stage
......@@ -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
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment