the -endstate ir/drscan option is broken. It would set endstate for the *next* JTAG operation rather than the current ir/drscan...
Comments? Can someone test this before I commit it? irscan omap3.jrc 7 -endstate IRPAUSE drscan omap3.jrc 8 0x89 -endstate DRPAUSE irscan omap3.jrc 2 -endstate IRPAUSE drscan omap3.jrc 32 0xa3002108 -endstate RUN/IDLE irscan omap3.jrc 0x3F -endstate RUN/IDLE -- Øyvind Harboe Embedded software and hardware consulting services http://consulting.zylin.com
### Eclipse Workspace Patch 1.0 #P openocd Index: src/jtag/jtag.c =================================================================== --- src/jtag/jtag.c (revision 1781) +++ src/jtag/jtag.c (working copy) @@ -2875,7 +2875,7 @@ /* "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 @@ 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 @@ } /* 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 @@ 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)
_______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development