My team and I are attempting to try and get OpenOCD working with a Freedom u500 SoC running on it. We currently can get the bitstream on the FPGA and it can even boot up Linux and drop us into a shell. However we did not have debug functionality for the endeavor and were hoping to try and get OpenOCD to work so we can use GDB to debug.
We tried breaking out the JTAG connections that you guys have on your Debug Core (TDI, TDO, TMS, TCK, Vcc, GND) out to GPIO’s on the board, so that we could use a debugger to interface with the pins. The debugger that we are using, currently the only one available to us, is an Altera USB-Blaster 2. The configuration file for the USB-Blaster 2 already exists in the RISCV fork of OpenOCD so there was no need to write a config for that. However since we are using a slightly modified Freedom SoC for the bitstream, I made a new configuration for the target. It is based on the configurations that were present for the Arty and Hifive1 boards.
When I try running OpenOCD, I use the command:
openocd -f interface/altera-usb-blaster2.cfg -f custom_freedom.cfg
The command runs, but it seems like OpenOCD only reads in the interface configuration file, and gets stuck trying to find the debug target. I’ve tried, running the command without the target configuration and it produces the same output, so I’m sure that the target configuration isn’t being read.
I was wondering how you guys go about using OpenOCD with the Arty? What connections do you break out? What is the mapping for it? I know you guys use an Olimex arm debugger to physically interact with the pins, but I was hoping to get some hints on how we could try and get OpenOCD to work with our board.