Merge pull request #856 from riscv/select_hart

target/riscv: Select hart in update_dcsr()
This commit is contained in:
Tim Newsome 2023-06-06 08:56:05 -07:00 committed by GitHub
commit e0dd44a53c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -1558,6 +1558,9 @@ static int wait_for_authbusy(struct target *target, uint32_t *dmstatus)
static int update_dcsr(struct target *target, bool step)
{
if (dm013_select_target(target) != ERROR_OK)
return ERROR_FAIL;
riscv_reg_t dcsr;
/* We want to twiddle some bits in the debug CSR so debugging works. */
int result = register_read_direct(target, &dcsr, GDB_REGNO_DCSR);