So apply this patch?
Can anyone test?
--
Ø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 1793)
+++ C:/workspace/openocd/src/jtag/jtag.c (working copy)
@@ -853,6 +853,9 @@
#endif
}
}
+
+ /* field_count represents the true number of fields setup*/
+ (*last_cmd)->cmd.scan->num_fields = field_count;
return ERROR_OK;
}
@@ -1315,7 +1318,7 @@
int i;
bit_count = jtag_scan_size(cmd);
- *buffer = malloc(CEIL(bit_count, 8));
+ *buffer = calloc(1,CEIL(bit_count, 8));
bit_count = 0;
@@ -3271,7 +3274,7 @@
#define B8(bits,count) { ((u8)B8__(HEX__(bits))), (count) }
-#if 0 && ((BUILD_FT2232_FTD2XX==1) || (BUILD_FT2232_LIBFTDI==1) ||
(BUILD_JLINK==1))
+#if 1 && ((BUILD_FT2232_FTD2XX==1) || (BUILD_FT2232_LIBFTDI==1) ||
(BUILD_JLINK==1))
/* this is the table submitted by Jeff Williams on 3/30/2009 with
this comment:
OK, I added Peter's version of the state table, and it works OK
for
@@ -3298,10 +3301,10 @@
/* to state: */
/* RESET IDLE DRSHIFT
DRPAUSE IRSHIFT IRPAUSE */
/* from state: */
- { B8(1111111,7), B8(0,1), B8(00101,5),
B8(01010,5), B8(001101,6), B8(010110,6) }, /* RESET */
- { B8(1111111,7), B8(0,1), B8(001,3),
B8(0101,4), B8(0011,4), B8(01011,5) }, /* IDLE
*/
+ { B8(1111111,7), B8(0000000,7), B8(00101,5),
B8(01010,5), B8(001101,6), B8(010110,6) }, /* RESET */
+ { B8(1111111,7), B8(0000000,7), B8(001,3),
B8(0101,4), B8(0011,4), B8(01011,5) }, /* IDLE */
{ B8(1111111,7), B8(011,3), B8(00111,5),
B8(01,2), B8(001111,6), B8(0101111,7) }, /*
DRSHIFT */
- { B8(1111111,7), B8(011,3), B8(01,2),
B8(0,1), B8(001111,6), B8(0101111,7) },
/* DRPAUSE */
+ { B8(1111111,7), B8(011,3), B8(01,2),
B8(0,1), B8(001111,6), B8(0101111,7) }, /*
DRPAUSE */
{ B8(1111111,7), B8(011,3), B8(00111,5),
B8(010111,6), B8(001111,6), B8(01,2) }, /* IRSHIFT */
{ B8(1111111,7), B8(011,3), B8(00111,5),
B8(010111,6), B8(01,2), B8(0,1) } /*
IRPAUSE */
@@ -3308,13 +3311,13 @@
#else /* this is the old table, converted from hex and with the bit_count set
to 7 for each combo, like before */
/* to state: */
- /* RESET IDLE DRSHIFT
DRPAUSE IRSHIFT IRPAUSE */
/* from state: */
- { B8(1111111,7), B8(0000000,7), B8(0010111,7), B8(0001010,7),
B8(0011011,7), B8(0010110,7) }, /* RESET */
- { B8(1111111,7), B8(0000000,7), B8(0100101,7), B8(0000101,7),
B8(0101011,7), B8(0001011,7) }, /* IDLE */
- { B8(1111111,7), B8(0110001,7), B8(0000000,7), B8(0000001,7),
B8(0001111,7), B8(0101111,7) }, /* DRSHIFT */
- { B8(1111111,7), B8(0110000,7), B8(0100000,7), B8(0010111,7),
B8(0011110,7), B8(0101111,7) }, /* DRPAUSE */
- { B8(1111111,7), B8(0110001,7), B8(0000111,7), B8(0010111,7),
B8(0000000,7), B8(0000001,7) }, /* IRSHIFT */
- { B8(1111111,7), B8(0110000,7), B8(0011100,7), B8(0010111,7),
B8(0100000,7), B8(0101111,7) } /* IRPAUSE */
+ /* RESET IDLE DRSHIFT
DRPAUSE IRSHIFT IRPAUSE */
/* from state: */
+ { B8(1111111,7), B8(0000000,7), B8(0010111,7), B8(0001010,7),
B8(0011011,7), B8(0010110,7) }, /* RESET */
+ { B8(1111111,7), B8(0000000,7), B8(0100101,7), B8(0000101,7),
B8(0101011,7), B8(0001011,7) }, /* IDLE */
+ { B8(1111111,7), B8(0110001,7), B8(0000000,7), B8(0000001,7),
B8(0001111,7), B8(0101111,7) }, /* DRSHIFT */
+ { B8(1111111,7), B8(0110000,7), B8(0100000,7), B8(0010111,7),
B8(0011110,7), B8(0101111,7) }, /* DRPAUSE */
+ { B8(1111111,7), B8(0110001,7), B8(0000111,7), B8(0010111,7),
B8(0000000,7), B8(0000001,7) }, /* IRSHIFT */
+ { B8(1111111,7), B8(0110000,7), B8(0011100,7), B8(0010111,7),
B8(0011110,7), B8(0101111,7) }, /* IRPAUSE */
#endif
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development