Programming with SWD


#1

Wondering if anyone knows of a good guide to learn how to program using the SWD interface and the ST link programmer?


#2

We have some good tutorials as part of our beta instructions, we just didn’t open them up yet to the public as it needs a little housekeeping. I would be happy to put you on the list so you can access it, though, if you send me your GitHub username.

We use a library called Adalink, provided by Adafruit, that is a Python wrapper around OpenOCD. It just makes it really easy to flash down hex or binary files to the nrf51822 with one command. You can find the library here: https://github.com/adafruit/Adafruit_Adalink

It works very well with the nrf51822 and the STLink v2. We have people that have used it on Windows and Mac, so it should work well for you no matter what platform you use.


Adalink unable to detect nrf1822 on Gateway Shield
#3

Sweet! my github user name is: wesner0019

Thanks!


#4

Here’s a few pics of how I rigged up my ST-Link v2 for the SWD headers. Works really well, the small breakout board is from adafruit.
Not the best pics but really all you need to do is match the pins up and you are set. If you are more of a visual person I think you could copy from the pics pretty easily since the connector keys are all visible.