Stuck at Debugging RISCV on Arty A7 using J-Link

Running the RISCV Processor

I got an Arty A7 board coming to my desk, and I’m curious to try running a RISCV processor on it. Not long after following the tutorial from Digilent, I was able to program the RISCV processor on this board just by using a MicroUSB cable.

Running the Program on RISCV

Now I have a RISCV running on this Arty A7 Board. I need to run a program. After a couple of minutes of researching, I found this post, I was able to put my program running by putting it on *.mcs that I build from the SiFive Freedom GitHub repository.

Or simply you could follow this explanation from YouTube to try to run your program without a debugger.

Now How to Debug?

Since I don’t have an Olimex debugger, I tried to find a way to debug it using J-link which is the only debugger available here. Luckily, I found this official guide from Segger, I tried to connect all the pins and start my Freedom Studio. I configured the debug configuration according to the wiki. Everything was going well until I found out that there is no output.

I thought it was a serial baud rate problem. Since the clock is downclocked and the serial baud rate is not updated. So currently in the master branch of freedom, the serial baud rate should be 57600. I tried to put my program inside the *.mcs file then flash it using Vivado via the micro USB port. It works.

I wonder why my J-link does not succeed in programming the Arty. Is it because of the wrong pins? But J-link said it detects the RISCV. Then I realize at the log there is verify failure.

However, I cannot continue to troubleshoot since I have other works to do. If you guys know this problem please share it with me. I will update this post as soon as I got it working. 😉

Leave a Reply

Your email address will not be published. Required fields are marked *