Fix flashing on HiFive1. (#649)

Broken by #645. It probably broke some other uses as well, but it was
reported (and easy to reproduce) as an issue with flashing.

Change-Id: Ic1b579c1361442479ced14156102ce68ab232396
Signed-off-by: Tim Newsome <tim@sifive.com>
This commit is contained in:
Tim Newsome 2021-10-05 11:17:24 -07:00 committed by GitHub
parent ef3e61bebc
commit 5215fc52ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -1113,6 +1113,9 @@ static int execute_resume(struct target *target, bool step)
LOG_DEBUG("step=%d", step);
if (riscv_flush_registers(target) != ERROR_OK)
return ERROR_FAIL;
maybe_write_tselect(target);
/* TODO: check if dpc is dirty (which also is true if an exception was hit