Skip to content

Commit

Permalink
Merge pull request #1193 from en-sc/en-sc/not-busy
Browse files Browse the repository at this point in the history
target/riscv: clear `abstract_cmd_maybe_busy` after commands
  • Loading branch information
en-sc authored Jan 27, 2025
2 parents 058891a + 83dc8a6 commit 1d62381
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/target/riscv/riscv-013.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,15 @@ static int abstract_cmd_batch_check_and_clear_cmderr(struct target *target,
if (res != ERROR_OK)
goto clear_cmderr;
}

dm013_info_t * const dm = get_dm(target);
if (!dm) {
LOG_ERROR("BUG: Target %s is not assigned to any RISC-V debug module",
target_name(target));
return ERROR_FAIL;
}
dm->abstract_cmd_maybe_busy = false;

*cmderr = get_field32(abstractcs, DM_ABSTRACTCS_CMDERR);
if (*cmderr == CMDERR_NONE)
return ERROR_OK;
Expand Down

0 comments on commit 1d62381

Please sign in to comment.