Open sujay-pandit opened 3 years ago
Hi Sujay,
Thank you for filing this ticket.
I can confirm this is a valid issue.
All bits in "abstractauto" DM registers are optional per the RISC-V Debug specification, and targets need not support it. However, the current OpenOCD code for both memory read and write via program buffer relies on the autoexecdata[0] bit - without checking if it is really supported.
Side note: Most targets appear to have autoexecdata[0] bit implemented, which is also recommended for performance reasons. That fact perhaps masked this issue in OpenOCD.
Thanks Jan, yes I agree. We have added autoexec support now.
I take it that this issue is still extant and awaiting a fix?
I take it that this issue is still extant and awaiting a fix?
Yes, it is still relevant. Though IMHO it's a low priority one, since most hardware does support autoexec
AFAIK.
Simple fix in "write_memory_progbuf" in riscv-013.c A check can be added to confirm if the support exists (by writing then reading back 0x18) and then based on that setting variable "setup_needed" as False in the first if-condition in the for-loop can be removed.