Bug in openocd "monitor shutdown"

(Peter Andreev) #1


State «dmactive» important fore me.

«Dmactive» is bit in DMI_DMCONTROLREG (0x10) register.

«Dmactive» activate the Debug module.

Step 1) I load bitfile in FPGA. After loading Debug Modul Dmactive is zero.
Step 2) I activated openocd on host mashine. Openocd activated debug module and set «dmactive» is one.
Step 3) I connect to openocd from gdb and debug my program.
Step 4) In ending debug my program I want disconnect openocd and deactivate debug module.
Step 5) In gdb I generate «monitor shutdown».

Openocd execute the quit on host machine.
But bit «dmactive» is not zero. It is one.

I expect that «dmactive» bit is zero.(State the debug module must the same as after loading bitfile.)

It is wery important fore me.

Is this bug?
Is it possible set «dmactive» in zero some way?


(Tim Newsome) #2

There’s been discussion about this at the riscv-openocd github. See https://github.com/riscv/riscv-openocd/issues/200 and https://github.com/riscv/riscv-openocd/pull/256. Can you add a comment on the first link indicating that you want this, so when I get back to that list I can prioritize better. In the meantime, the patch in the pull request should work for you even if it’s not perfect for all cases.


(Peter Andreev) #3

Thanks Tim
I compile openOCD with patch.
Yes, its work for me.
I registre on githab later.