fix broken ir/drscan -endstate option. The statemachine now actually ends up in said...
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 14 May 2009 18:45:19 +0000 (18:45 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 14 May 2009 18:45:19 +0000 (18:45 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1784 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/jtag.c

index 32211ba12ecba3f4a677fcd782919656aba9a410..c58cde6fe05020525234a7923b73bfe15495478e 100644 (file)
@@ -2875,7 +2875,7 @@ static int handle_irscan_command(struct command_context_s *cmd_ctx, char *cmd, c
        /*          "statename" */
        /* at the end of the arguments. */
        /* assume none. */
-       endstate = TAP_INVALID;
+       endstate = cmd_queue_end_state;
        if( argc >= 4 ){
                /* have at least one pair of numbers. */
                /* is last pair the magic text? */
@@ -2918,19 +2918,17 @@ static int handle_irscan_command(struct command_context_s *cmd_ctx, char *cmd, c
                fields[i].in_value = NULL;
        }
 
-       jtag_add_ir_scan(num_fields, fields, TAP_INVALID);
        /* did we have an endstate? */
-       if (endstate != TAP_INVALID)
-               jtag_add_end_state(endstate);
+       jtag_add_ir_scan(num_fields, fields, endstate);
 
-       jtag_execute_queue();
+       int retval=jtag_execute_queue();
 
        for (i = 0; i < num_fields; i++)
                free(fields[i].out_value);
 
        free (fields);
 
-       return ERROR_OK;
+       return retval;
 }
 
 static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args)
@@ -2959,7 +2957,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args
        }
 
        /* assume no endstate */
-       endstate = TAP_INVALID;
+       endstate = cmd_queue_end_state;
        /* validate arguments as numbers */
        e = JIM_OK;
        for (i = 2; i < argc; i+=2)
@@ -3031,10 +3029,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args
                field_count++;
        }
 
-       jtag_add_dr_scan(num_fields, fields, TAP_INVALID);
-       /* did we get an end state? */
-       if (endstate != TAP_INVALID)
-               jtag_add_end_state(endstate);
+       jtag_add_dr_scan(num_fields, fields, endstate);
 
        retval = jtag_execute_queue();
        if (retval != ERROR_OK)

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)