diff options
author | Jonas Norling <jonas.norling@cyanconnode.com> | 2017-10-25 10:38:49 +0200 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2017-12-06 20:55:14 +0000 |
commit | 7e6445109763d47707e1d31620b3733b5137faba (patch) | |
tree | 9cf183eeffa02d57269c581f9d5e48e9db092806 /src | |
parent | 41092636d1a10d7fe55a986f0d5556a4c34b58d2 (diff) | |
download | riscv-openocd-7e6445109763d47707e1d31620b3733b5137faba.zip riscv-openocd-7e6445109763d47707e1d31620b3733b5137faba.tar.gz riscv-openocd-7e6445109763d47707e1d31620b3733b5137faba.tar.bz2 |
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 <jonas.norling@cyanconnode.com>
Reviewed-on: http://openocd.zylin.com/4269
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Diffstat (limited to 'src')
-rw-r--r-- | src/target/adi_v5_swd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/target/adi_v5_swd.c b/src/target/adi_v5_swd.c index 41ddbd7..a6aada3 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 = { |