File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -261,15 +261,19 @@ proc configure_event_gdb_attach { } {
261
261
}
262
262
}
263
263
264
- proc configure_shutdown_command { } {
264
+ # When openocd gets the shutdown signal, it first executes shutdown commands. After that, invokes the gdb_detach event
265
+ # callbacks. This is fine for the xtensa but for the riscv, command order is important. Because we will disable the DM
266
+ # within the shutdown command
267
+ proc configure_shutdown_command_riscv { } {
268
+ lappend ::pre_shutdown_commands { esp process_lazy_breakpoints }
265
269
# disable debug module to clear ASSIST_DEBUG_CORE_0_DEBUG_MODULE_ACTIVE register.
266
270
lappend ::pre_shutdown_commands { riscv dmi_write 0x10 0 }
267
271
}
268
272
269
273
proc configure_openocd_events { ARCH } {
270
274
if { $ARCH == " riscv" } {
271
275
configure_event_halted
272
- configure_shutdown_command
276
+ configure_shutdown_command_riscv
273
277
}
274
278
configure_event_examine_end
275
279
configure_event_reset_assert_post
You can’t perform that action at this time.
0 commit comments