diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2020-05-19 16:41:17 +0200 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2020-08-02 10:48:41 +0100 |
commit | 768502403ee0513d0e289c22b27c7296300fe39d (patch) | |
tree | d2e02167c02cfe6c53d83d9c8b660d6560912e31 /src/target | |
parent | 33b52174e6a0fc7513059e27dea18dee7b105781 (diff) | |
download | riscv-openocd-768502403ee0513d0e289c22b27c7296300fe39d.zip riscv-openocd-768502403ee0513d0e289c22b27c7296300fe39d.tar.gz riscv-openocd-768502403ee0513d0e289c22b27c7296300fe39d.tar.bz2 |
target: use one second timeout while halting target at gdb attach
By default GDB timeouts after 2 seconds, even if this value can be
modified with GDB command "set remotetimeout".
On OpenOCD side, the default event for GDB attach is to halt the
target and wait it to halt. But here the default timeout of the
halt command is 5 seconds!
If the target cannot be halted (e.g. it's kept in reset by another
core or the debugger doesn't have enough privileges) then GDB will
timeout while OpenOCD is still waiting and is unable to
communicate with GDB.
Decrease the halt timeout to 1 second in the default GDB attach
event handler.
Change-Id: I231c740816bb6a0d74b0bc679a368a6cbfb34824
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5687
Tested-by: jenkins
Diffstat (limited to 'src/target')
-rw-r--r-- | src/target/startup.tcl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/startup.tcl b/src/target/startup.tcl index 93e46b5..ca39b18 100644 --- a/src/target/startup.tcl +++ b/src/target/startup.tcl @@ -205,7 +205,7 @@ proc init_target_events {} { foreach t $targets { set_default_target_event $t gdb-flash-erase-start "reset init" set_default_target_event $t gdb-flash-write-end "reset halt" - set_default_target_event $t gdb-attach "halt" + set_default_target_event $t gdb-attach "halt 1000" } } |