Skip to content

Instantly share code, notes, and snippets.

@noahp
Last active November 11, 2015 18:32
Show Gist options
  • Save noahp/734c34662cb8a6774bb4 to your computer and use it in GitHub Desktop.
Save noahp/734c34662cb8a6774bb4 to your computer and use it in GitHub Desktop.
# program and verify using elf/hex/s19. verify and reset
# are optional parameters
openocd -f openocd_atsam4s4b_stlink2.cfg -c "program filename.elf verify reset exit"
# binary files need the flash address passing
openocd -f openocd_atsam4s4b_stlink2.cfg -c "program filename.bin exit 0x08000000"
#
# Atmel ATSAM4S4BA + ST-Link v2 configuration script
#
source [find interface/stlink-v2.cfg]
# chip name
set CHIPNAME ATSAM4S4BA
set CPUTAPID 0x2ba01477
source [find target/at91sam4sd32x.cfg]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment