From 637d76b585a8b7d952f20757e2418654b957a9a4 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Sun, 14 Mar 2021 13:23:46 +0100 Subject: [PATCH] cl_utils.c: Try jtag scan if swd scan did not give results. --- src/platforms/pc/cl_utils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/platforms/pc/cl_utils.c b/src/platforms/pc/cl_utils.c index a20d4c1a..b67bd9bd 100644 --- a/src/platforms/pc/cl_utils.c +++ b/src/platforms/pc/cl_utils.c @@ -364,6 +364,10 @@ int cl_execute(BMP_CL_OPTIONS_t *opt) num_targets = platform_jtag_scan(NULL); } else { num_targets = platform_adiv5_swdp_scan(opt->opt_targetid); + if (!num_targets) { + DEBUG_INFO("Scan SWD failed, trying JTAG!\n"); + num_targets = platform_jtag_scan(NULL); + } } if (!num_targets) { DEBUG_WARN("No target found\n");