Committed 2033 Convert obscure illegal arguments case to an assert rather than runtime error. I have never seen this error in OpenOCD btw...
-- Øyvind Harboe Embedded software and hardware consulting services http://consulting.zylin.com
Index: C:/workspace/openocd/src/jtag/jtag.c =================================================================== --- C:/workspace/openocd/src/jtag/jtag.c (revision 2032) +++ C:/workspace/openocd/src/jtag/jtag.c (working copy) @@ -393,9 +393,6 @@ jtag_error=ERROR_JTAG_TRST_ASSERTED; return; } - - if (cmd_queue_end_state == TAP_RESET) - jtag_call_event_callbacks(JTAG_TRST_ASSERTED); } static void jtag_prelude(tap_state_t state) @@ -601,6 +598,8 @@ retval=interface_jtag_add_tlr(); if (retval!=ERROR_OK) jtag_error=retval; + + jtag_call_event_callbacks(JTAG_TRST_ASSERTED); } void jtag_add_pathmove(int num_states, const tap_state_t *path) @@ -760,7 +759,6 @@ LOG_DEBUG("JTAG reset with RESET instead of TRST"); jtag_add_end_state(TAP_RESET); jtag_add_tlr(); - jtag_call_event_callbacks(JTAG_TRST_ASSERTED); return; } Index: C:/workspace/openocd/src/jtag/jtag.h =================================================================== --- C:/workspace/openocd/src/jtag/jtag.h (revision 2032) +++ C:/workspace/openocd/src/jtag/jtag.h (working copy) @@ -218,6 +218,16 @@ LINE_PUSH_PULL = 0x1, }; +/* + * There are three cases when JTAG_TRST_ASSERTED callback is invoked. The + * event is invoked *after* TRST is asserted. It is illegal to communicate + * with the JTAG interface during the callback(as there is currently + * a queue being built). + * - TMS reset + * - SRST pulls TRST + * - TRST asserted + * + **/ enum jtag_event { JTAG_TRST_ASSERTED };
_______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development