Hi,

On Sun, Nov 02, 2008 at 08:04:21PM +0100, ?yvind Harboe wrote:
> > I guess that a move to TLR must be handled not by jtag_add_pathmove but
> > rather by jtag_add_tlr?
> 
> That's correct.
Ok, I've put together a preliminary patch that tries to keep TAP_TLR out of
the calls to jtag_add_pathmove, calling jtag_add_tlr instead.

This gets rid of the annoying BUG messages with the accompanying shutdown of
openocd. But it still does not allow me to use the xsvf player.

As Øyvind pointed out, jtag_add_tlr does more than just moving the TAP
statemachine to the TLR state, incidentally setting all devices to bypass.

Now, I've identified two places where the the TLR state is used inside the
xsvf player. One is in the XSTATE command. If and when XSTATE 00 is coded in
the xsvf file, my patch issues jtag_add_tlr, even if it's in the middle of
other XSTATE commands. 
The other place is within the xsvf_add_statemove. I need to investigate this
further, but my target seems to have blown a gasket. This will have to be
fixed first.

Peter
-- 
"Only wimps use tape backup: _real_ men just upload their important stuff
on ftp, and let the rest of the world mirror it ;)"
(Linus Torvalds, about his failing hard drive on linux.cs.helsinki.fi)
Index: src/xsvf/xsvf.c
===================================================================
--- src/xsvf/xsvf.c     (revision 1117)
+++ src/xsvf/xsvf.c     (working copy)
@@ -86,6 +86,7 @@
        if ((state != TAP_TLR) && (state == cmd_queue_cur_state))
                return;
 
+       if(state==TAP_TLR) {jtag_add_tlr(); return; }
        for (i=0; i<7; i++)
        {
                int j = (move >> i) & 1;
@@ -401,7 +402,19 @@
                                                do_abort = 1;
                                        else
                                        {
-                                               jtag_add_pathmove(path_len, 
path);
+                                               int i,lasti;
+                                               for(i=0,lasti=0;i<path_len;i++) 
{
+                                                       if(path[i]==TAP_TLR) {
+                                                               if(i>lasti)  {
+                                                                       
jtag_add_pathmove(i-lasti,path+lasti);
+                                                               }
+                                                               lasti=i+1;
+                                                               jtag_add_tlr();
+                                                       }
+                                               }
+                                               if(i>=lasti) {
+                                                       
jtag_add_pathmove(i-lasti, path+lasti);
+                                               }
                                        }
                                        free(path);
                                }

Attachment: pgpMUUYCnFQk7.pgp
Description: PGP signature

_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to