Skip to content

Instantly share code, notes, and snippets.

@skrishnakanth
Created September 15, 2020 16:30
Show Gist options
  • Save skrishnakanth/0ad8ee06f337a266955c30b0fe88687f to your computer and use it in GitHub Desktop.
Save skrishnakanth/0ad8ee06f337a266955c30b0fe88687f to your computer and use it in GitHub Desktop.
Script for flashing nRF51822 microcontroller using OpenOCD and STLink v2
#!/bin/bash
openocd -f interface/stlink.cfg -f target/nrf51.cfg -c "init" -c "halt" -c "nrf51 mass_erase" -c "program $1 verify" -c "reset" -c "exit"
@skrishnakanth
Copy link
Author

$ ./nrf51_flash.sh program.hex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment