From: Jonas Norling Date: Wed, 25 Oct 2017 08:38:49 +0000 (+0200) Subject: adi_v5_swd: Add error message when SWD fails to connect X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7e6445109763d47707e1d31620b3733b5137faba;p=openocd adi_v5_swd: Add error message when SWD fails to connect Error message instead of failing silently. Change-Id: Ie54a5bf68459d3c0e96cc38080ffad8de0a4b5ce Signed-off-by: Jonas Norling Reviewed-on: http://openocd.zylin.com/4269 Tested-by: jenkins Reviewed-by: Tomas Vanek --- diff --git a/src/target/adi_v5_swd.c b/src/target/adi_v5_swd.c index 41ddbd78..a6aada32 100644 --- a/src/target/adi_v5_swd.c +++ b/src/target/adi_v5_swd.c @@ -427,7 +427,10 @@ static int swd_init(struct command_context *ctx) /* First connect after init is not reconnecting. */ dap->do_reconnect = false; - return swd_connect(dap); + int retval = swd_connect(dap); + if (retval != ERROR_OK) + LOG_ERROR("SWD connect failed"); + return retval; } static struct transport swd_transport = {