]> git.sur5r.net Git - openocd/commit
Only call cmsis_dap_cmd_DAP_SWD_Configure when swd_mode is enabled
authorBas Vermeulen <bas@daedalean.ai>
Tue, 21 Nov 2017 16:12:24 +0000 (17:12 +0100)
committerSpencer Oliver <spen@spen-soft.co.uk>
Wed, 6 Dec 2017 21:07:10 +0000 (21:07 +0000)
commit06aebfacda1f60052f6ea0f3d09936184e1bfab8
treefaabb2155164f789d7a19f8ef71e5ed9d3d7df60
parent5d6bf8704ce7ed9a7e471e601ab91061c39f88c6
Only call cmsis_dap_cmd_DAP_SWD_Configure when swd_mode is enabled

The CMSIS-DAP used by NXP's LS1012ARDB board only supports JTAG,
and not SWD. Calling cmsis_dap_cmd_DAP_SWD_Configure returns with an
error (and doesn't actually do anything in the debugger).

Wrap the call to cmsis_dap_cmd_DAP_SWD_Configure in a check for
swd_mode, to make sure initialisation doesn't fail needlessly.

Change-Id: Id7e568cb6e36886bd7c5b3699d198a77a51c28c9
Signed-off-by: Bas Vermeulen <bas@daedalean.ai>
Reviewed-on: http://openocd.zylin.com/4294
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
src/jtag/drivers/cmsis_dap_usb.c