diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2021-12-09 17:55:46 +0100 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2021-12-18 17:23:34 +0000 |
commit | 29e689ede680f0b3bd106b80b9844c45459265e4 (patch) | |
tree | 314d23d8a104d3b66d4a4b596190662296116f5c /src/helper | |
parent | 33fa237b2ffdfc24b7e0c0861ac7708b21431c8c (diff) | |
download | riscv-openocd-29e689ede680f0b3bd106b80b9844c45459265e4.zip riscv-openocd-29e689ede680f0b3bd106b80b9844c45459265e4.tar.gz riscv-openocd-29e689ede680f0b3bd106b80b9844c45459265e4.tar.bz2 |
openocd: add keep_alive during command sleep
The command sleep holds the host CPU until it completes.
Send keep_alive to GDB, so it will not timeout.
Change-Id: I92e9c5fc871b4e6a7695cdc449ca9fb3c1f1d9ec
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6770
Tested-by: jenkins
Reviewed-by: Jan Matyas <matyas@codasip.com>
Diffstat (limited to 'src/helper')
-rw-r--r-- | src/helper/command.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/helper/command.c b/src/helper/command.c index 53ee250..1e769d7 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -1145,6 +1145,7 @@ COMMAND_HANDLER(handle_sleep_command) int64_t then = timeval_ms(); while (timeval_ms() - then < (int64_t)duration) { target_call_timer_callbacks_now(); + keep_alive(); usleep(1000); } } else |