I have been playing with the Hifive1 for a few weeks and I have time and again been encountering a problem during debugging. I saw this post the other day, so I thought maybe I was doing it wrong. But today I tried the instructions explained there and still the same problem.
Below you can see what I have done. Basically connect to openocd, create a breakpoint anywhere in the code (in the image it's main, but it also happens if I choose any other address), and try to run from the beginning. If instead of
run I try to
continue, the same problem arises.
This is during executing
make run_gdb PROGRAM=owny BOARD=freedom-e300-hifive1 on one window and
make run_openocd BOARD=freedom-e300-hifive1 on another. (Sorry but I can't upload more than one image yet ).
As you can see everything looks fine until this error appears:
halted at 0x404 due to software breakpoint
Error: Core got an exception (0xffffffff) while writing to 0x204005ca
Error: Failed to write 2-byte breakpoint instruction at 0x204005ca
Error: can't add breakpoint: unknown reason
In case you were wondering, I can upload to Hifive1 without apparent problems, so I don't thinks it's a problem with permissions in my system, and if I remember correctly, last week I tried to run some tests as root, and had the same problem...
Until now, the way I have been dealing with this is adding a loop before the code I want to debug so that I can execute the debugger before it executes and begin stepping from there, but this is a huge pain, as you can imagine.
Any ideas what might be wrong??