Has anyone gotten the Spark Core working with OpenOCD? I know it supports the STM32, so I should be able to get it working, I just wanted to see if someone already has a definition.
In the latest release there’s support for bit-banging a JTAG interface over GPIO on the Raspberry Pi. So I think I can get a nice little JTAG programmer/debugger working for those of you with a Pi!
I’ll put this on the top of my list for today. I’ll keep detailed instructions and most likely post the entire .img file once I get it working, so you can just load it onto an SD card and wire the Core up. Most likely I’ll end up making a shield out of some perfboard (or maybe this Adafruit Proto-Shield I’ve had sitting around for ages), but it shouldn’t be hard to breadboard.
(I’ll be putting a Logic header directly on the board, plus LEDs for testing. I think I’ll route the Core’s I2C, UART and SPI ports directly to the Pi’s for easy two-way testing of those interfaces. There’s some pretty powerful I2C/SMbus tools for Linux that are amazing for debugging. One of the best is the ability to see the status of every register on an I2C device!)
I have the breadboard version of that. I bought a cheap one from eBay, though, so the breadboard was already glued on top. My poor Arduinos have been collecting dust since I backed this Kickstarter project (my previous project was an nRF24L01 network for cheap wireless).
The first thing the core-firmware image does is disable the JTAG pins, so be sure to either halt the chip in reset with your debugger or flash a new image in that doesn’t disable your debug interface first. Also be sure in the image your trying to debug that you disable the JTAG pins remapping… there’s a #define for it.
A note on feedback for the JTAG shield… its Ok but basically impossible to use with an external circuit or breadboard. So its fine if your doing pure software… like porting a RTOS, but for debugging with external hardware there’s no easy way to connect it.
If the spark socket was rotated 90 degrees and the board itself was made only as thin as required to support the 700 mils for the socket I could solder in headers and pogo the shield onto a breadboard.
There is an extra row of plated through holes already on the JTAG shield I imagine was intended for soldering in a 2nd set of headers on the bottom for pogo into a protoboard, the problem is that the vertical overall orientation of the shield blocks your access to the pins in the protoboard below.
I really like your vertical jtag plug in board, If I get a free evening I may design the two boards an upload to OSHPark if anyone else is interested. Does anyone know offhand the part number (mouser) for the 20 pin jtag shrouded header?
I started working on my own little JTAG shield today. Right now it’s got a normal 20 pin JTAG connector, a 26 pin Raspberry Pi connector, a socket for the Spark Core and space for a half-size breadboard. I’ve got female headers routed on both sides of the breadboard which bring out all the Spark Core signals, with an additional row of male headers nearby for signal probing use (Logic, Scope, Bus Pirate, DMM).
The entire BOM is available on Digikey for about $7. I’ll post a link to the board here soon if anyone wants to take a look!
Okay, I got the Pi talking to the Spark Core via OpenOCD! I still need to do a bit more testing here, but it looks like this is going to work perfectly.
Note the interface file comes from the ftdi directory.
I built (and flashed) my firmware with the following command to set the #defines such that the JTAG pins were enabled and to build with debug symbols (I’d expect DEBUG_BUILD to do that, anyway! ):
Have u completed the JTAG programmer/debugger using raspberry PI?
If yes, please do share some information on it. I am also interested in the same
Thanx