diff options
author | Paul Fertser <fercerpav@gmail.com> | 2014-05-23 15:17:31 +0400 |
---|---|---|
committer | Andreas Fritiofson <andreas.fritiofson@gmail.com> | 2014-06-01 17:28:18 +0000 |
commit | cd74dd28911353674e599744c1acce8bf3a6a7a7 (patch) | |
tree | 70caa1f55922a27becabd491c39a5c903306be55 | |
parent | 8f9cea457d85fd1fb6e060bc1a7fe402d47e2c15 (diff) | |
download | riscv-openocd-cd74dd28911353674e599744c1acce8bf3a6a7a7.zip riscv-openocd-cd74dd28911353674e599744c1acce8bf3a6a7a7.tar.gz riscv-openocd-cd74dd28911353674e599744c1acce8bf3a6a7a7.tar.bz2 |
target: reexamine after polling succeeds again
If polling was failing, it likely meant that either the target was
disconnected or rebooted. In the latter case it needs to be reexamined
to be properly configured for the debug session, so do it just in
case.
Reported-by: Tim Sander <tim@krieglstein.org>
Tested-by: Tim Sander <tim@krieglstein.org>
Change-Id: I5b067c18d9276d4e86cc59739f196ae7d0931622
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2151
Tested-by: jenkins
Reviewed-by: Tim Sander <tim@krieglstein.org>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
-rw-r--r-- | src/target/target.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/target/target.c b/src/target/target.c index 9416b25..4d277c6 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -2418,8 +2418,12 @@ static int handle_target(void *priv) return retval; } /* Since we succeeded, we reset backoff count */ - if (target->backoff.times > 0) - LOG_USER("Polling target %s succeeded again", target_name(target)); + if (target->backoff.times > 0) { + LOG_USER("Polling target %s succeeded again, trying to reexamine", target_name(target)); + target_reset_examined(target); + target_examine_one(target); + } + target->backoff.times = 0; } } |