aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcgsfv <cgsfv@users.noreply.github.com>2024-03-25 11:51:07 -0700
committercgsfv <cgsfv@users.noreply.github.com>2024-03-25 11:51:07 -0700
commita4598e4b8b71e4a8bf0c00a840ff7ff60751d70a (patch)
tree43ce76d0c442ebecc52b912779fbdb4214292c8d
parent506ebe8fe116bfc12c2489f1d02708381ee2fbd9 (diff)
downloadriscv-openocd-a4598e4b8b71e4a8bf0c00a840ff7ff60751d70a.zip
riscv-openocd-a4598e4b8b71e4a8bf0c00a840ff7ff60751d70a.tar.gz
riscv-openocd-a4598e4b8b71e4a8bf0c00a840ff7ff60751d70a.tar.bz2
Ensuring target is selected when resuming it
-rw-r--r--src/target/riscv/riscv-013.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c
index 92d010e..e83dee9 100644
--- a/src/target/riscv/riscv-013.c
+++ b/src/target/riscv/riscv-013.c
@@ -5251,6 +5251,10 @@ static int riscv013_step_or_resume_current_hart(struct target *target,
return ERROR_FAIL;
}
+ if (dm013_select_target(target) != ERROR_OK) {
+ return ERROR_FAIL;
+ }
+
dm013_info_t *dm = get_dm(target);
/* Issue the resume command, and then wait for the current hart to resume. */
uint32_t dmcontrol = DM_DMCONTROL_DMACTIVE | DM_DMCONTROL_RESUMEREQ;