diff --git a/src/target/riscv/batch.c b/src/target/riscv/batch.c index cb5a10856..155573da6 100644 --- a/src/target/riscv/batch.c +++ b/src/target/riscv/batch.c @@ -44,6 +44,8 @@ bool riscv_batch_full(struct riscv_batch *batch) void riscv_batch_run(struct riscv_batch *batch) { + keep_alive(); + LOG_DEBUG("running a batch of %ld scans", (long)batch->used_scans); riscv_batch_add_nop(batch); diff --git a/src/target/riscv/program.c b/src/target/riscv/program.c index 04edf6a09..efad623e4 100644 --- a/src/target/riscv/program.c +++ b/src/target/riscv/program.c @@ -41,6 +41,8 @@ int riscv_program_init(struct riscv_program *p, struct target *target) int riscv_program_exec(struct riscv_program *p, struct target *t) { + keep_alive(); + if (riscv_debug_buffer_leave(t, p) != ERROR_OK) { LOG_ERROR("unable to write program buffer exit code"); return ERROR_FAIL;