I've committed some fixes to ARM11 error handling + target/imx31.cfg file.

I don't understand precisely what is being suggested by Dominic & Laurent
that should be done to jtag_validate_chain().

I'll be happy to take a patch for a spin I've got an iMX31 in my office.

I did try to fix jtag_examine_chain() according to the descriptions
in the discussion, see attached patch.

Any comments?




> reset
JTAG device found: 0x2b900f0f (Manufacturer: 0x787, Part: 0xb900, Version: 0x2)
JTAG device found: 0x07b3601d (Manufacturer: 0x00e, Part: 0x7b36, Version: 0x0)
Device does not have IDCODE
JTAG device found: 0x2190101d (Manufacturer: 0x00e, Part: 0x1901, Version: 0x2)
Error validating JTAG scan chain, IR mismatch, scan returned 0x0c2011
Error validating JTAG scan chain, IR mismatch, scan returned 0x0c2011
Error validating JTAG scan chain, IR mismatch, scan returned 0x0c2011
Error validating JTAG scan chain, IR mismatch, scan returned 0x0c2011
Error validating JTAG scan chain, IR mismatch, scan returned 0x0c2011
Error validating JTAG scan chain, IR mismatch, scan returned 0x0c2011
Could not validate JTAG chain

-- 
Øyvind Harboe
http://www.zylin.com/zy1000.html
ARM7 ARM9 XScale Cortex
JTAG debugger and flash programmer
Index: C:/workspace/openocd/src/jtag/jtag.c
===================================================================
--- C:/workspace/openocd/src/jtag/jtag.c        (revision 929)
+++ C:/workspace/openocd/src/jtag/jtag.c        (working copy)
@@ -1364,9 +1364,8 @@
                if ((idcode & 1) == 0)
                {
                        /* LSB must not be 0, this indicates a device in bypass 
*/
-                       device_count++;
-                       
-                       LOG_WARNING("Device was in bypass after TRST/TMS 
reset");
+                       LOG_WARNING("Device does not have IDCODE");
+                       idcode=0;
                        
                        bit_count += 1;
                }
@@ -1403,13 +1402,6 @@
                                break;
                        }
                        
-                       if (device)
-                       {
-                               device->idcode = idcode;
-                               device = device->next;
-                       }
-                       device_count++;
-                       
                        manufacturer = (idcode & 0xffe) >> 1;
                        part = (idcode & 0xffff000) >> 12;
                        version = (idcode & 0xf0000000) >> 28;
@@ -1419,6 +1411,12 @@
                        
                        bit_count += 32;
                }
+               if (device)
+               {
+                       device->idcode = idcode;
+                       device = device->next;
+               }
+               device_count++;
        }
        
        /* see if number of discovered devices matches configuration */
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to