Talking to Bluz with Adalink and ST-Link/v2


#1

Ultimately I am trying to flash my Bluz based boards. As an initial test to see that my JTAG programmer is setup correctly I am just trying to run a command on one of my gateways.

I am doing:

adalink nrf51822 --programmer stlink --info

It is coming back with:

adalink.errors.AdaLinkError: Could not find nrf51822, is it connected?

Every time I execute this command the Photon on the gateway seems to reboot. Is the rebooting expected behavior? Am I correct in assuming this should work? Thanks!


#2

Yes, that should work.

You said the Photon, so does this mean you are trying it on the gateway shield? It could reset the Photon as the reset lines are tied together. It may be best to try this without the Puoton in the shield.

If the command still doesn’t work, you can ensure the connections are proper. How are you adapting the 20-pins of the STLink to the 10-pin header on the gateway shield?

Also, what OS are you using? Windows? Linux? Mac? The drivers may not all be working, did you get OpenOCD installed properly?


#3

Awesome. Taking out the photon did the trick!

I got that to work, and then I just hooked it up to my board and now it is working as well. I am getting the Device ID.

The next step is to generate an ID in Particle, I am guessing I need to generate one then send to you via email?


#4

Yup, I will need to add them for you. I will need the full ID which is output from the python script that you have access to in the GitHub repository. So if you run that, you can just copy+paste the device IDs to me. The full ID’s always start with “b1e2”

If you are doing multiple, you can send me all of them at once, makes it a little easier.


#5

Cool. I just sent you an email.