Common people

So much soul searching about a oneliner in jtag.c .

Setting the current tap state with  cmd_queue_cur_state = TAP_RESET is 
an obvious error as 5 minutes of code inspection in jtag.c will show you.

The variable is not used in any dr/ir scan code, It is only used in  
jtag_add_path_move to find the start state, and for sanity check in 
jtag_add_clocks. It will be overwritten by the next call to jtag_prelude 
by any ir/dr scan, and all driver code uses tap_get_state() instead.

Actually ALL  uses of  cmd_queue_cur_state should be retired and 
replaced  by correct accessor function tap_get_state(), as it is now we 
have two variables tracing the current tap state, cmd_queue_cur_state 
and state_follower.

I am not saying that nothing will change from this, it most probably 
will, but the old code is broken and perhaps it is time to fix it.

Have a nice weekend
Magnus



_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to