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:
Evgeniy Naydanov 2025-01-27 15:54:38 +03:00 committed by GitHub
commit 1d623819e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 0 deletions

View File

@ -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;