From cdb4e1de4fe4016c22b860620860c4c2c5d90c9b Mon Sep 17 00:00:00 2001 From: Palmer Dabbelt Date: Thu, 31 May 2018 23:42:13 -0700 Subject: [PATCH] Clear that first error --- src/target/riscv/riscv-013.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index cbbfd4a93..aaf3713b8 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -2068,6 +2068,7 @@ static int read_memory_progbuf(struct target *target, target_addr_t address, AC_ACCESS_REGISTER_POSTEXEC); result = execute_abstract_command(target, command); if (result != ERROR_OK) { + riscv013_clear_abstract_error(target); /* Reading the first word failed, which is fine -- we just * assume this is some sort of before-memory read from Eclipse. * */