Merge pull request #1193 from en-sc/en-sc/not-busy
target/riscv: clear `abstract_cmd_maybe_busy` after commands
This commit is contained in:
commit
1d623819e9
|
@ -630,6 +630,15 @@ static int abstract_cmd_batch_check_and_clear_cmderr(struct target *target,
|
||||||
if (res != ERROR_OK)
|
if (res != ERROR_OK)
|
||||||
goto clear_cmderr;
|
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);
|
*cmderr = get_field32(abstractcs, DM_ABSTRACTCS_CMDERR);
|
||||||
if (*cmderr == CMDERR_NONE)
|
if (*cmderr == CMDERR_NONE)
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
|
|
Loading…
Reference in New Issue