diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c index 4f2f6b5f5..f2a5bf8fd 100644 --- a/src/jtag/tcl.c +++ b/src/jtag/tcl.c @@ -189,6 +189,7 @@ static int handle_jtag_reset_command(struct command_context_s *cmd_ctx, char *cm static int handle_runtest_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); static int handle_irscan_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *argv); +static int Jim_Command_pathmove(Jim_Interp *interp, int argc, Jim_Obj *const *argv); static int Jim_Command_flush_count(Jim_Interp *interp, int argc, Jim_Obj *const *args); static int handle_verify_ircapture_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); @@ -658,6 +659,7 @@ int jtag_register_commands(struct command_context_s *cmd_ctx) COMMAND_EXEC, "execute IR scan [dev2] [instr2] ..."); register_jim(cmd_ctx, "drscan", Jim_Command_drscan, "execute DR scan ..."); register_jim(cmd_ctx, "flush_count", Jim_Command_flush_count, "returns number of times the JTAG queue has been flushed"); + register_jim(cmd_ctx, "pathmove", Jim_Command_pathmove, "move JTAG to state1 then to state2, state3, etc. ,,..."); register_command(cmd_ctx, NULL, "verify_ircapture", handle_verify_ircapture_command, COMMAND_ANY, "verify value captured during Capture-IR "); @@ -1308,6 +1310,48 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args } +static int Jim_Command_pathmove(Jim_Interp *interp, int argc, Jim_Obj *const *args) +{ + tap_state_t states[8]; + + if ((argc < 2) || ((size_t)argc > (sizeof(states)/sizeof(*states)+1))) + { + Jim_WrongNumArgs(interp, 1, args, "wrong arguments"); + return JIM_ERR; + } + + int i; + for (i=0; i