diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-01-31 21:02:06 +0100 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-02-01 13:45:09 +0100 |
commit | 91e3268737b578a182cb661d60551657f799ab3c (patch) | |
tree | 733079ed93317f4a18912be8f7e7a85076c742c0 /src/jtag/startup.tcl | |
parent | 82f2492138e053d5e3577e83b80cab8d41c0d08b (diff) | |
download | riscv-openocd-91e3268737b578a182cb661d60551657f799ab3c.zip riscv-openocd-91e3268737b578a182cb661d60551657f799ab3c.tar.gz riscv-openocd-91e3268737b578a182cb661d60551657f799ab3c.tar.bz2 |
gdb: restore behavior from 0.3.1 for srst_asserted and power_restore
srst_asserted and power_restore can now be overriden to do
nothing. By default they will "reset init" the targets and
halt gdb.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/jtag/startup.tcl')
-rw-r--r-- | src/jtag/startup.tcl | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/jtag/startup.tcl b/src/jtag/startup.tcl index ab215ba..4e6d5fc 100644 --- a/src/jtag/startup.tcl +++ b/src/jtag/startup.tcl @@ -30,8 +30,18 @@ proc init_reset { mode } { # documented nor supported except on ZY1000. proc power_restore {} { - puts "Sensed power restore." + puts "Sensed power restore, running reset init and halting GDB." reset init + + # Halt GDB so user can deal with a detected power restore. + # + # After GDB is halted, then output is no longer forwarded + # to the GDB console. + set targets [target names] + foreach t $targets { + # New event script. + $t invoke-event arp_halt_gdb + } } add_help_text power_restore "Overridable procedure run when power restore is detected. Runs 'reset init' by default." @@ -46,9 +56,20 @@ proc power_dropout {} { # documented nor supported except on ZY1000. proc srst_deasserted {} { - puts "Sensed nSRST deasserted." + puts "Sensed nSRST deasserted, running reset init and halting GDB." reset init + + # Halt GDB so user can deal with a detected reset. + # + # After GDB is halted, then output is no longer forwarded + # to the GDB console. + set targets [target names] + foreach t $targets { + # New event script. + $t invoke-event arp_halt_gdb + } } + add_help_text srst_deasserted "Overridable procedure run when srst deassert is detected. Runs 'reset init' by default." proc srst_asserted {} { |