This is an automated email from Gerrit.

Pushpal Sidhu ([email protected]) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/1550

-- gerrit

commit 427048011ffeafcb59bb83fb3b78196fa914f168
Author: Pushpal Sidhu <[email protected]>
Date:   Wed Aug 14 13:59:29 2013 -0700

    jtag_reset: Added functionality to jtag_reset command
    
    Changes happened in the COMMAND_HANDLER(handle_jtag_reset_command) function
    to allow for an arbitrary number of trst srts pairs. This would allow for
    faster toggling than calling jtag_reset multiple times which is necessary
    for some microcontrollers such as the MSP430FRxxxx.
    Also call interface_jtag_add_reset instead of jtag_add_reset since 
jtag_reset
    is a low-level command. Added usage information to accomodate this change.
    
    Change-Id: I927513fa072faf7e050971d4aa5e614694ccac5a
    Signed-off-by: Pushpal Sidhu <[email protected]>

diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c
index d0020cd..5984181 100644
--- a/src/jtag/tcl.c
+++ b/src/jtag/tcl.c
@@ -1036,29 +1036,33 @@ COMMAND_HANDLER(handle_jtag_rclk_command)
 
 COMMAND_HANDLER(handle_jtag_reset_command)
 {
-       if (CMD_ARGC != 2)
-               return ERROR_COMMAND_SYNTAX_ERROR;
-
-       int trst = -1;
-       if (CMD_ARGV[0][0] == '1')
-               trst = 1;
-       else if (CMD_ARGV[0][0] == '0')
-               trst = 0;
-       else
-               return ERROR_COMMAND_SYNTAX_ERROR;
-
-       int srst = -1;
-       if (CMD_ARGV[1][0] == '1')
-               srst = 1;
-       else if (CMD_ARGV[1][0] == '0')
-               srst = 0;
-       else
+       unsigned int i;
+       if ((CMD_ARGC % 2) != 0)
                return ERROR_COMMAND_SYNTAX_ERROR;
 
        if (adapter_init(CMD_CTX) != ERROR_OK)
                return ERROR_JTAG_INIT_FAILED;
 
-       jtag_add_reset(trst, srst);
+       for (i = 0; i < CMD_ARGC; i += 2) {
+               int trst = -1;
+               if (CMD_ARGV[i][0] == '1')
+                       trst = 1;
+               else if (CMD_ARGV[i][0] == '0')
+                       trst = 0;
+               else
+                       return ERROR_COMMAND_SYNTAX_ERROR;
+
+               int srst = -1;
+               if (CMD_ARGV[i + 1][0] == '1')
+                       srst = 1;
+               else if (CMD_ARGV[i + 1][0] == '0')
+                       srst = 0;
+               else
+                       return ERROR_COMMAND_SYNTAX_ERROR;
+
+               interface_jtag_add_reset(trst, srst);
+       }
+
        return jtag_execute_queue();
 }
 
@@ -1317,7 +1321,7 @@ static const struct command_registration 
jtag_command_handlers[] = {
                .mode = COMMAND_EXEC,
                .help = "Set reset line values.  Value '1' is active, "
                        "value '0' is inactive.",
-               .usage = "trst_active srst_active",
+               .usage = "trst_active srst_active [trst_active srst_active]*",
        },
        {
                .name = "runtest",

-- 

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to