aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngus Gratton <gus@projectgus.com>2014-07-24 08:14:04 +1000
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>2014-08-11 20:49:05 +0000
commitf701c0cbeb346df4cda378d3b4d5136aabba3b37 (patch)
treeb8578e2e1c9288a5a3d3613e77cbbcf55641b901
parente1bc7f454568dc2cd1d89cfbe327c219ddc67dfc (diff)
downloadriscv-openocd-f701c0cbeb346df4cda378d3b4d5136aabba3b37.zip
riscv-openocd-f701c0cbeb346df4cda378d3b4d5136aabba3b37.tar.gz
riscv-openocd-f701c0cbeb346df4cda378d3b4d5136aabba3b37.tar.bz2
newdap: Ignore -irlen/-irmask/etc newdap params on SWD or CMSIS-DAP
Previously the -irlen parameter was required even though it is not a part of the SWD or CMSIS-DAP transports. This may eventually need to be changed for CMSIS-DAP once that supports JTAG as well. Change-Id: Ia02b67840c19c7cf1c7a75063648c0174176a311 Signed-off-by: Angus Gratton <gus@projectgus.com> Reviewed-on: http://openocd.zylin.com/2226 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
-rw-r--r--src/jtag/tcl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c
index dd2be1e..647ac70 100644
--- a/src/jtag/tcl.c
+++ b/src/jtag/tcl.c
@@ -553,8 +553,15 @@ static int jim_newtap_cmd(Jim_GetOptInfo *goi)
LOG_DEBUG("Creating New Tap, Chip: %s, Tap: %s, Dotted: %s, %d params",
pTap->chip, pTap->tapname, pTap->dotted_name, goi->argc);
+ if (!transport_is_jtag()) {
+ /* SWD or CMSIS-DAP (which is currently SWD-only) doesn't
+ require any JTAG tap parameters */
+ jtag_tap_init(pTap);
+ return JIM_OK;
+ }
+
/* IEEE specifies that the two LSBs of an IR scan are 01, so make
- * that the default. The "-irlen" and "-irmask" options are only
+ * that the default. The "-ircapture" and "-irmask" options are only
* needed to cope with nonstandard TAPs, or to specify more bits.
*/
pTap->ir_capture_mask = 0x03;