2003-06-18 Marcel Telka <marcel@telka.sk>

* src/discovery.c (discovery): Removed explicit JTAG chain length detection. Changed starting of the DR
		size detection from all 1 instead all 0 for IR (patch 753298, Matan Ziv-Av).


git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@488 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Marcel Telka 22 years ago
parent 70c4a01ef7
commit efe4e647e0

@ -1,3 +1,8 @@
2003-06-18 Marcel Telka <marcel@telka.sk>
* src/discovery.c (discovery): Removed explicit JTAG chain length detection. Changed starting of the DR
size detection from all 1 instead all 0 for IR (patch 753298, Matan Ziv-Av).
2003-06-18 Marcel Telka <marcel@telka.sk>
* /src/flash.c (flash_drivers): Added 1 x 8 bit Intel Flash driver (patch 753295, Matan Ziv-Av).

@ -7,6 +7,8 @@ See libbrux/NEWS for more news.
* Fixed bugs in SH7727 bus driver (thanks to Rainer Dörken).
* Added bus width detection using MD3 and MD4 signals in SH7727 bus driver
(thanks to Rainer Dörken).
* Removed explicit JTAG chain length detection for 'discovery' command
(patch 753298, Matan Ziv-Av).
* Minor bugs fixed.
jtag-0.4 (2003-05-29):

@ -107,68 +107,14 @@ jtag_reset( chain_t *chain )
tap_reset( chain );
}
#define MAX_CHAIN_LENGTH 128
void
discovery( chain_t *chain, const char *filename )
{
int i;
int irlen;
tap_register *ir;
tap_register *irz;
FILE *f = NULL;
tap_register *id = register_alloc( 32 );
tap_register *zeros = register_fill( register_alloc( 32 ), 0 );
tap_register *ones = register_fill( register_alloc( 32 ), 1 );
if (id && zeros && ones) {
f = fopen( filename, "w" );
if (!f)
printf( _("Error: Unable to create file '%s'.\n"), filename );
} else
printf( _("Error: Out of memory!\n") );
if (!id || !zeros || !ones || !f) {
register_free( id );
register_free( zeros );
register_free( ones );
return;
}
printf( _("Detecting JTAG chain length:\n") );
fprintf( f, _("Detecting JTAG chain length:\n") );
jtag_reset( chain );
tap_capture_dr( chain );
for (i = 0; i < MAX_CHAIN_LENGTH; i++) {
tap_shift_register( chain, zeros, id, 0 );
if (!register_compare( id, zeros ))
break; /* end of chain */
if (!register_compare( ones, id )) {
printf( _("bad JTAG connection (TDO is 1)\n") );
fprintf( f, _("bad JTAG connection (TDO is 1)\n") );
break;
}
printf( _("ID[%d]: %s\n"), i, register_get_string( id ) );
fprintf( f, _("ID[%d]: %s\n"), i, register_get_string( id ) );
}
register_free( id );
register_free( zeros );
register_free( ones );
if (i == MAX_CHAIN_LENGTH) {
printf( _("Warning: Maximum internal JTAG chain length exceeded!\n") );
fprintf( f, _("Warning: Maximum internal JTAG chain length exceeded!\n") );
} else {
printf( _("JTAG chain length is %d\n"), i );
fprintf( f, _("JTAG chain length is %d\n"), i );
}
/* detecting IR size */
jtag_reset( chain );
@ -187,7 +133,8 @@ discovery( chain_t *chain, const char *filename )
return;
}
ir = register_fill( register_alloc( irlen ), 0 );
/* all 1 is BYPASS in all parts, so DR length gives number of parts */
ir = register_fill( register_alloc( irlen ), 1 );
irz = register_duplicate( ir );
if (!ir || !irz) {

Loading…
Cancel
Save