From 92ea7e41b9261d4d7a88d96cc3ef0a727d1059f0 Mon Sep 17 00:00:00 2001 From: Kevin Yang Date: Mon, 12 Oct 2020 15:33:47 -0700 Subject: [PATCH] target: Examine subsequent targets after failure When a target examination fails, continue to examine subsequent targets. Return the number of targets that failed to examine. Change-Id: I883a0c445edc7eb00f496b79271d773771ec6b66 Signed-off-by: Kevin Yang Reviewed-on: http://openocd.zylin.com/5855 Tested-by: jenkins Reviewed-by: Antonio Borneo --- src/target/target.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/target/target.c b/src/target/target.c index 39575b01c..3b1c666e5 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -766,9 +766,11 @@ int target_examine(void) if (target->defer_examine) continue; - retval = target_examine_one(target); - if (retval != ERROR_OK) - return retval; + int retval2 = target_examine_one(target); + if (retval2 != ERROR_OK) { + LOG_WARNING("target %s examination failed", target_name(target)); + retval = retval2; + } } return retval; }