Skip to content

Commit

Permalink
tcl/esp_common: configure shutdown on examine-fail event
Browse files Browse the repository at this point in the history
  • Loading branch information
sobuch authored and erhankur committed Feb 5, 2025
1 parent 18a0391 commit 9753829
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tcl/target/esp_common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,14 @@ proc configure_event_gdb_attach { } {
}
}

proc configure_event_examine_fail { } {
global _TARGETNAME_0

$_TARGETNAME_0 configure -event examine-fail {
shutdown
}
}

# When openocd gets the shutdown signal, it first executes shutdown commands. After that, invokes the gdb_detach event
# callbacks. This is fine for the xtensa but for the riscv, command order is important. Because we will disable the DM
# within the shutdown command
Expand All @@ -278,6 +286,7 @@ proc configure_openocd_events { ARCH } {
configure_event_examine_end
configure_event_reset_assert_post
configure_event_gdb_attach
configure_event_examine_fail
}

proc configure_esp_riscv_default_settings { } {
Expand Down

0 comments on commit 9753829

Please sign in to comment.