Skip to content

Instantly share code, notes, and snippets.

@robot9706
Created March 8, 2020 20:52
Show Gist options
  • Select an option

  • Save robot9706/9119d26fa860a257c8db8f5fb25573e8 to your computer and use it in GitHub Desktop.

Select an option

Save robot9706/9119d26fa860a257c8db8f5fb25573e8 to your computer and use it in GitHub Desktop.
Programming an nrf51822 using OpenOCD
openocd.cfg:
source [find interface/stlink-v2.cfg]
transport select hla_swd
set WORKAREASIZE 0x4000
source [find target/nrf51.cfg]
Erase flash & flash SoftDevice:
halt
nrf51 mass_erase
program s110_nrf51822_6.0.0_softdevice.hex verify
reset
Program app:
halt
program ble_led_ctrl.hex verify
reset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment