riscv-debug-spec icon indicating copy to clipboard operation
riscv-debug-spec copied to clipboard

add appendix use case: how to halt at first instruction out of reset

Open mwachs5 opened this issue 5 years ago • 3 comments

there are lots of nice use cases in the appendix. I think another useful one could be "halting at first instruction out of reset"

mwachs5 avatar Apr 21 '20 20:04 mwachs5

That's exactly what I need. How do you reset and halt at first instructions? I'm not able to find this in the documentation. There's no DMCONTROL.resethaltreq in my implementation, yet the debugger has no problem halting at first instruction. How is that done?

dsula avatar Apr 07 '23 13:04 dsula

Assuming the debugger you're using is OpenOCD, I suggest capturing a log when running it with -d3 and you'll be able to see exactly what OpenOCD is doing. It might take some time to find the right part in the log, as it will be huge, though. ;)

timsifive avatar Apr 07 '23 17:04 timsifive

Yes, I was able to wade thru the openocd log file and got the sequence. The sequence was as expected. Interestingly however, the sequence does not work when implementing as a custom reset using the segger jlink tools. But thanks for your suggestion.

dsula avatar Apr 10 '23 14:04 dsula