From fb7c8b310ae3b754d23122ebd8f0e752c4b6a181 Mon Sep 17 00:00:00 2001 From: Evgeniy Naydanov Date: Fri, 29 Jul 2022 11:27:06 +0300 Subject: [PATCH] Remove incorrect debug_log in wait_for_idle According to RISC-V External Debug Support Version 0.13.2 (paragraph 3.12.6), cmderr field contains a valid value only if busy is 0, so it is incorrect to analize it on timeout. --- src/target/riscv/riscv-013.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index a2d887e0b..23d3aafc9 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -748,20 +748,6 @@ static int wait_for_idle(struct target *target, uint32_t *abstractcs) if (time(NULL) - start > riscv_command_timeout_sec) { info->cmderr = get_field(*abstractcs, DM_ABSTRACTCS_CMDERR); - if (info->cmderr != CMDERR_NONE) { - const char *errors[8] = { - "none", - "busy", - "not supported", - "exception", - "halt/resume", - "reserved", - "reserved", - "other" }; - - LOG_ERROR("Abstract command ended in error '%s' (abstractcs=0x%x)", - errors[info->cmderr], *abstractcs); - } LOG_ERROR("Timed out after %ds waiting for busy to go low (abstractcs=0x%x). " "Increase the timeout with riscv set_command_timeout_sec.",