Committed.

This is easily enough removed if it was a bad idea...

The JTAG examine is the very first thing that happens

Asingle JTAG device requires only 64 bits to be read back correctly.

The code below adds a check that the rest of the data scanned (640 bits)
are all as expected. This helps diagnose/catch problems with the JTAG chain
earlier and gives more helpful/explicit error messages.


Index: C:/workspace/openocd/src/jtag/jtag.c
===================================================================
--- C:/workspace/openocd/src/jtag/jtag.c        (revision 877)
+++ C:/workspace/openocd/src/jtag/jtag.c        (working copy)
@@ -1372,6 +1372,15 @@
                        if (idcode == 0x000000FF)
                        {
                                /* End of chain (invalid manufacturer ID) */
+                               for (bit_count += 32; bit_count < 
(JTAG_MAX_CHAIN_SIZE * 32) -
31;bit_count += 32)
+                               {
+                                       idcode = buf_get_u32(idcode_buffer, 
bit_count, 32);
+                                       if (idcode != 0x000000FF)
+                                       {
+                                               LOG_WARNING("Unexpected idcode 
after end of chain! 0x%08x", idcode);
+                                       }
+                               }
+                               
                                break;
                        }
                        


-- 
Øyvind Harboe
http://www.zylin.com/zy1000.html
ARM7 ARM9 XScale Cortex
JTAG debugger and flash programmer
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to