2003-05-28 Marcel Telka <marcel@telka.sk>

* configure.ac (AC_INIT): Changed version number to 0.4.

	* src/cmd/frequency.c (cmd_frequency_run): Added support for printing current TCK frequency.
	(cmd_frequency_help): Updated help text.

	* po/POTFILES.in: Updated.
	* src/detect.c (find_record, detect_parts): Marked messages for translation.
	* src/discovery.c (detect_register_size, discovery): Ditto.
	* src/flash.c (set_flash_driver, flashcheck, flashmsbin, flashmem): Ditto.
	* src/readmem.c (readmem): Ditto.
	* src/flash/amd.c (amd_flash_print_info, amd_32_flash_driver): Ditto.
	* src/flash/intel.c (_intel_flash_print_info, intel_flash_erase_block, intel_flash_unlock_block)
	(intel_flash_program, intel_32_flash_driver, intel_16_flash_driver): Ditto.
	* src/tap/cable/arcom.c (arcom_cable_driver): Ditto.
	* src/tap/cable/byteblaster.c (byteblaster_cable_driver): Ditto.
	* src/tap/cable/dlc5.c (dlc5_cable_driver): Ditto.
	* src/tap/cable/ea253.c (ea253_cable_driver): Ditto.
	* src/tap/cable/ei012.c (ei012_cable_driver): Ditto.
	* src/tap/cable/keithkoep.c (keithkoep_cable_driver): Ditto.
	* src/tap/cable/mpcbdm.c (mpcbdm_cable_driver): Ditto.
	* src/tap/cable/wiggler.c (wiggler_cable_driver): Ditto.


git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@447 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Marcel Telka 22 years ago
parent 1a253587a0
commit bbfcc7dcfd

@ -1,3 +1,27 @@
2003-05-28 Marcel Telka <marcel@telka.sk>
* configure.ac (AC_INIT): Changed version number to 0.4.
* src/cmd/frequency.c (cmd_frequency_run): Added support for printing current TCK frequency.
(cmd_frequency_help): Updated help text.
* po/POTFILES.in: Updated.
* src/detect.c (find_record, detect_parts): Marked messages for translation.
* src/discovery.c (detect_register_size, discovery): Ditto.
* src/flash.c (set_flash_driver, flashcheck, flashmsbin, flashmem): Ditto.
* src/readmem.c (readmem): Ditto.
* src/flash/amd.c (amd_flash_print_info, amd_32_flash_driver): Ditto.
* src/flash/intel.c (_intel_flash_print_info, intel_flash_erase_block, intel_flash_unlock_block)
(intel_flash_program, intel_32_flash_driver, intel_16_flash_driver): Ditto.
* src/tap/cable/arcom.c (arcom_cable_driver): Ditto.
* src/tap/cable/byteblaster.c (byteblaster_cable_driver): Ditto.
* src/tap/cable/dlc5.c (dlc5_cable_driver): Ditto.
* src/tap/cable/ea253.c (ea253_cable_driver): Ditto.
* src/tap/cable/ei012.c (ei012_cable_driver): Ditto.
* src/tap/cable/keithkoep.c (keithkoep_cable_driver): Ditto.
* src/tap/cable/mpcbdm.c (mpcbdm_cable_driver): Ditto.
* src/tap/cable/wiggler.c (wiggler_cable_driver): Ditto.
2003-05-27 Marcel Telka <marcel@telka.sk>
* src/part/part.c (part_set_signal, part_get_signal): Moved variable declarations to beginning

@ -8,6 +8,7 @@ $Id$
* Added new command 'endian' to configure access mode to external files.
* Added JTAG declarations for Broadcom BCM5421S (patch 743129, Matan Ziv-Av).
* Added bus driver for Hitachi SH7727 (based on patch 743140, Matan Ziv-Av).
* Added support for printing current JTAG frequency.
* Minor bugs fixed.
jtag-0.3.2 (2003-04-04):

@ -1,7 +1,7 @@
#
# $Id$
#
# Copyright (C) 2002 ETC s.r.o.
# Copyright (C) 2002, 2003 ETC s.r.o.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -18,10 +18,10 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
#
# Written by Marcel Telka <marcel@telka.sk>, 2002.
# Written by Marcel Telka <marcel@telka.sk>, 2002, 2003.
#
AC_INIT(jtag,0.3.2)
AC_INIT(jtag,0.4)
AC_PREREQ(2.54)
AC_COPYRIGHT([Copyright (C) 2002, 2003 ETC s.r.o.])

@ -1,31 +1,46 @@
# $Id$
src/jtag.c
src/readmem.c
src/bus/ixp425.c
src/bus/pxa2x0.c
src/bus/sa1110.c
src/cmd/cmd.c
src/cmd/frequency.c
src/cmd/help.c
src/cmd/quit.c
src/bus/sh7727.c
src/cmd/cable.c
src/cmd/cmd.c
src/cmd/detect.c
src/cmd/discovery.c
src/cmd/detectflash.c
src/cmd/discovery.c
src/cmd/dr.c
src/cmd/endian.c
src/cmd/flashmem.c
src/cmd/frequency.c
src/cmd/get.c
src/cmd/help.c
src/cmd/instruction.c
src/cmd/print.c
src/cmd/quit.c
src/cmd/readmem.c
src/cmd/shift.c
src/cmd/get.c
src/cmd/script.c
src/cmd/set.c
src/cmd/shift.c
src/detect.c
src/discovery.c
src/flash/amd.c
src/flash.c
src/flash/intel.c
src/jtag.c
src/part/data_register.c
src/part/instruction.c
src/part/parse.c
src/part/part.c
src/readmem.c
src/tap/cable/arcom.c
src/tap/cable/byteblaster.c
src/tap/cable/dlc5.c
src/tap/cable/ea253.c
src/tap/cable/ei012.c
src/tap/cable/keithkoep.c
src/tap/cable/mpcbdm.c
src/tap/cable/wiggler.c
src/tap/chain.c
src/tap/parport/direct.c
src/tap/parport/ppdev.c

@ -35,6 +35,11 @@ cmd_frequency_run( char *params[] )
{
unsigned int freq;
if (cmd_params( params ) == 1) {
printf( _("Current TCK frequency is %u Hz\n"), frequency );
return 1;
}
if (cmd_params( params ) != 2)
return -1;
@ -51,8 +56,8 @@ static void
cmd_frequency_help( void )
{
printf( _(
"Usage: %s FREQ\n"
"Change TCK frequency to FREQ.\n"
"Usage: %s [FREQ]\n"
"Change TCK frequency to FREQ or print current TCK frequency.\n"
"\n"
"FREQ is in hertz. It's a maximum TCK frequency for JTAG interface.\n"
"In some cases the TCK frequency is less than FREQ, but the frequency\n"

@ -22,6 +22,8 @@
*
*/
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@ -49,7 +51,7 @@ find_record( char *filename, tap_register *key, struct id_record *idr )
file = fopen( filename, "r" );
if (!file) {
printf( "Cannot open %s\n", filename );
printf( _("Cannot open %s\n"), filename );
return 0;
}
@ -170,7 +172,7 @@ detect_parts( chain_t *chain, char *db_path )
parts_t *ps = parts_alloc();
if (!zeros || !ones || !id || !ps) {
printf( "%s: out of memory\n", __FUNCTION__ );
printf( _("%s: out of memory\n"), __FUNCTION__ );
register_free( zeros );
register_free( ones );
@ -194,11 +196,11 @@ detect_parts( chain_t *chain, char *db_path )
break; /* end of chain */
if (!register_compare( ones, id )) {
printf( "%s: bad JTAG connection (TDO is 1)\n", __FUNCTION__ );
printf( _("%s: bad JTAG connection (TDO is 1)\n"), __FUNCTION__ );
break;
}
printf( "Device Id: %s\n", register_get_string( id ) );
printf( _("Device Id: %s\n"), register_get_string( id ) );
strcpy( data_path, db_path ); /* FIXME: Buffer overrun */
@ -208,15 +210,15 @@ detect_parts( chain_t *chain, char *db_path )
key = register_alloc( 11 );
memcpy( key->data, &id->data[1], key->len );
if (!find_record( data_path, key, &idr )) {
printf( " Unknown manufacturer!\n" );
printf( _(" Unknown manufacturer!\n") );
register_free( key );
continue;
}
register_free( key );
printf( " Manufacturer: %s\n", idr.fullname );
printf( _(" Manufacturer: %s\n"), idr.fullname );
if (strlen( idr.fullname ) > MAXLEN_MANUFACTURER)
printf( "Warning: Manufacturer too long\n" );
printf( _("Warning: Manufacturer too long\n") );
strncpy( manufacturer, idr.fullname, MAXLEN_MANUFACTURER );
manufacturer[MAXLEN_MANUFACTURER] = '\0';
@ -232,7 +234,7 @@ detect_parts( chain_t *chain, char *db_path )
key = register_alloc( 16 );
memcpy( key->data, &id->data[12], key->len );
if (!find_record( data_path, key, &idr )) {
printf( " Unknown part!\n" );
printf( _(" Unknown part!\n") );
register_free( key );
continue;
}
@ -240,7 +242,7 @@ detect_parts( chain_t *chain, char *db_path )
printf( " Part: %s\n", idr.fullname );
if (strlen( idr.fullname ) > MAXLEN_PART)
printf( "Warning: Part too long\n" );
printf( _("Warning: Part too long\n") );
strncpy( partname, idr.fullname, MAXLEN_PART );
partname[MAXLEN_PART] = '\0';
@ -256,15 +258,15 @@ detect_parts( chain_t *chain, char *db_path )
key = register_alloc( 4 );
memcpy( key->data, &id->data[28], key->len );
if (!find_record( data_path, key, &idr )) {
printf( " Unknown stepping!\n" );
printf( _(" Unknown stepping!\n") );
register_free( key );
continue;
}
register_free( key );
printf( " Stepping: %s\n", idr.fullname );
printf( _(" Stepping: %s\n"), idr.fullname );
if (strlen( idr.fullname ) > MAXLEN_STEPPING)
printf( "Warning: Stepping too long\n" );
printf( _("Warning: Stepping too long\n") );
strncpy( stepping, idr.fullname, MAXLEN_STEPPING );
stepping[MAXLEN_STEPPING] = '\0';
@ -276,7 +278,7 @@ detect_parts( chain_t *chain, char *db_path )
data_path[0] = '\0';
strcat( data_path, idr.name );
printf( " Filename: %s\n", data_path );
printf( _(" Filename: %s\n"), data_path );
f = fopen( data_path, "r" );
part = read_part( f, id );
if (part) {
@ -286,7 +288,7 @@ detect_parts( chain_t *chain, char *db_path )
part->active_instruction = part_find_instruction( part, "IDCODE" );
parts_add_part( ps, part );
} else {
printf( "%s(%s:%d) Error: part read failed\n", __FUNCTION__, __FILE__, __LINE__ );
printf( _("%s(%s:%d) Error: part read failed\n"), __FUNCTION__, __FILE__, __LINE__ );
exit( 1 );
}
if (f)

@ -51,7 +51,7 @@ detect_register_size( chain_t *chain, FILE *f )
int p;
int ok = 0;
fprintf( f, "\tTesting register length: %d\n", len );
fprintf( f, _("\tTesting register length: %d\n"), len );
rz = register_fill( register_alloc( len ), 0 );
rout = register_alloc( DETECT_PATTERN_SIZE + len );
@ -65,7 +65,7 @@ detect_register_size( chain_t *chain, FILE *f )
s = register_get_string( rpat );
while (*s)
s++;
fprintf( f, "\t\tPattern: %s, ", s - DETECT_PATTERN_SIZE );
fprintf( f, _("\t\tPattern: %s, "), s - DETECT_PATTERN_SIZE );
for (i = 0; i < TEST_COUNT; i++) {
tap_shift_register( chain, rz, NULL, 0 );
@ -76,7 +76,7 @@ detect_register_size( chain_t *chain, FILE *f )
if (register_compare( rpat, rout ) == 0)
ok++;
}
fprintf( f, "%d %%\n", 100 * ok / TEST_COUNT );
fprintf( f, _("%d %%\n"), 100 * ok / TEST_COUNT );
if (100 * ok / TEST_COUNT < TEST_THRESHOLD) {
ok = 0;
break;
@ -125,9 +125,9 @@ discovery( chain_t *chain, const char *filename )
if (id && zeros && ones) {
f = fopen( filename, "w" );
if (!f)
printf( "Error: Unable to create file '%s'.\n", filename );
printf( _("Error: Unable to create file '%s'.\n"), filename );
} else
printf( "Error: Out of memory!\n" );
printf( _("Error: Out of memory!\n") );
if (!id || !zeros || !ones || !f) {
register_free( id );
@ -136,8 +136,8 @@ discovery( chain_t *chain, const char *filename )
return;
}
printf( "Detecting JTAG chain length:\n" );
fprintf( f, "Detecting JTAG chain length:\n" );
printf( _("Detecting JTAG chain length:\n") );
fprintf( f, _("Detecting JTAG chain length:\n") );
jtag_reset( chain );
@ -148,13 +148,13 @@ discovery( chain_t *chain, const char *filename )
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" );
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 ) );
printf( _("ID[%d]: %s\n"), i, register_get_string( id ) );
fprintf( f, _("ID[%d]: %s\n"), i, register_get_string( id ) );
}
register_free( id );
@ -162,27 +162,27 @@ discovery( chain_t *chain, const char *filename )
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" );
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 );
printf( _("JTAG chain length is %d\n"), i );
fprintf( f, _("JTAG chain length is %d\n"), i );
}
/* detecting IR size */
jtag_reset( chain );
printf( "Detecting IR size...\n" );
fprintf( f, "Detecting IR size:\n" );
printf( _("Detecting IR size...\n") );
fprintf( f, _("Detecting IR size:\n") );
tap_capture_ir( chain );
irlen = detect_register_size( chain, f );
printf( "IR length is %d\n\n", irlen );
fprintf( f, "IR length is %d\n\n", irlen );
printf( _("IR length is %d\n\n"), irlen );
fprintf( f, _("IR length is %d\n\n"), irlen );
if (irlen < 1) {
printf( "Error: Invalid IR length!\n" );
printf( _("Error: Invalid IR length!\n") );
fclose( f );
return;
}
@ -194,7 +194,7 @@ discovery( chain_t *chain, const char *filename )
register_free( ir );
register_free( irz );
fclose( f );
printf( "Error: Out of memory!\n" );
printf( _("Error: Out of memory!\n") );
return;
}
@ -206,14 +206,14 @@ discovery( chain_t *chain, const char *filename )
tap_capture_ir( chain );
tap_shift_register( chain, ir, NULL, 1 );
printf( "Detecting DR size for IR %s ...\n", register_get_string( ir ) );
fprintf( f, "Detecting DR size for IR %s:\n", register_get_string( ir ) );
printf( _("Detecting DR size for IR %s ...\n"), register_get_string( ir ) );
fprintf( f, _("Detecting DR size for IR %s:\n"), register_get_string( ir ) );
tap_capture_dr( chain );
rs = detect_register_size( chain, f );
printf( "DR length for IR %s is %d\n\n", register_get_string( ir ), rs );
fprintf( f, "DR length for IR %s is %d\n\n", register_get_string( ir ), rs );
printf( _("DR length for IR %s is %d\n\n"), register_get_string( ir ), rs );
fprintf( f, _("DR length for IR %s is %d\n\n"), register_get_string( ir ), rs );
register_inc( ir );
if (register_compare( ir, irz ) == 0)

@ -32,6 +32,8 @@
*
*/
#include <config.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
@ -68,7 +70,7 @@ set_flash_driver( bus_t *bus, cfi_query_structure_t *cfi )
return;
}
printf( "unknown flash - vendor id: %d (0x%04x)\n",
printf( _("unknown flash - vendor id: %d (0x%04x)\n"),
cfi->identification_string.pri_id_code,
cfi->identification_string.pri_id_code );
}
@ -81,18 +83,18 @@ flashcheck( bus_t *bus, cfi_array_t **cfi_array )
bus_prepare( bus );
printf( "Note: Supported configuration is 2 x 16 bit or 1 x 16 bit only\n" );
printf( _("Note: Supported configuration is 2 x 16 bit or 1 x 16 bit only\n") );
*cfi_array = NULL;
if (detect_cfi( bus, 0, cfi_array )) {
cfi_array_free( *cfi_array );
printf( "Flash not found!\n" );
printf( _("Flash not found!\n") );
return;
}
set_flash_driver( bus, &(*cfi_array)->cfi_chips[0]->cfi );
if (!flash_driver) {
printf( "Flash not supported!\n" );
printf( _("Flash not supported!\n") );
return;
}
flash_driver->flash_print_info( bus );
@ -107,7 +109,7 @@ flashmsbin( bus_t *bus, FILE *f )
flashcheck( bus, &cfi_array );
if (!cfi_array || !flash_driver) {
printf( "no flash driver found\n" );
printf( _("no flash driver found\n") );
return;
}
cfi = &cfi_array->cfi_chips[0]->cfi;
@ -118,7 +120,7 @@ flashmsbin( bus_t *bus, FILE *f )
fread( &sync, sizeof (char), 7, f );
sync[7] = '\0';
if (strcmp( "B000FF\n", sync ) != 0) {
printf( "Invalid sync sequence!\n" );
printf( _("Invalid sync sequence!\n") );
return;
}
}
@ -136,12 +138,12 @@ flashmsbin( bus_t *bus, FILE *f )
for (; first <= last; first++) {
adr = first * cfi->device_geometry.erase_block_regions[0].erase_block_size * 2;
flash_unlock_block( bus, adr );
printf( "block %d unlocked\n", first );
printf( "erasing block %d: %d\n", first, flash_erase_block( bus, adr ) );
printf( _("block %d unlocked\n"), first );
printf( _("erasing block %d: %d\n"), first, flash_erase_block( bus, adr ) );
}
}
printf( "program:\n" );
printf( _("program:\n") );
for (;;) {
uint32_t a, l, c;
@ -149,25 +151,25 @@ flashmsbin( bus_t *bus, FILE *f )
fread( &l, sizeof l, 1, f );
fread( &c, sizeof c, 1, f );
if (feof( f )) {
printf( "Error: premature end of file\n" );
printf( _("Error: premature end of file\n") );
return;
}
printf( "record: start = 0x%08X, len = 0x%08X, checksum = 0x%08X\n", a, l, c );
printf( _("record: start = 0x%08X, len = 0x%08X, checksum = 0x%08X\n"), a, l, c );
if ((a == 0) && (c == 0))
break;
if (l & 3) {
printf( "Error: Invalid record length!\n" );
printf( _("Error: Invalid record length!\n") );
return;
}
while (l) {
uint32_t data;
printf( "addr: 0x%08X\r", a );
printf( _("addr: 0x%08X\r"), a );
fflush(stdout);
fread( &data, sizeof data, 1, f );
if (flash_program( bus, a, data )) {
printf( "\nflash error\n" );
printf( _("\nflash error\n") );
return;
}
a += 4;
@ -179,7 +181,7 @@ flashmsbin( bus_t *bus, FILE *f )
flash_readarray( bus );
fseek( f, 15, SEEK_SET );
printf( "verify:\n" );
printf( _("verify:\n") );
for (;;) {
uint32_t a, l, c;
@ -188,26 +190,26 @@ flashmsbin( bus_t *bus, FILE *f )
fread( &l, sizeof l, 1, f );
fread( &c, sizeof c, 1, f );
if (feof( f )) {
printf( "Error: premature end of file\n" );
printf( _("Error: premature end of file\n") );
return;
}
printf( "record: start = 0x%08X, len = 0x%08X, checksum = 0x%08X\n", a, l, c );
printf( _("record: start = 0x%08X, len = 0x%08X, checksum = 0x%08X\n"), a, l, c );
if ((a == 0) && (c == 0))
break;
if (l & 3) {
printf( "Error: Invalid record length!\n" );
printf( _("Error: Invalid record length!\n") );
return;
}
while (l) {
uint32_t data, readed;
printf( "addr: 0x%08X\r", a );
printf( _("addr: 0x%08X\r"), a );
fflush( stdout );
fread( &data, sizeof data, 1, f );
readed = bus_read( bus, a );
if (data != readed) {
printf( "\nverify error: 0x%08X vs. 0x%08X at addr %08X\n",
printf( _("\nverify error: 0x%08X vs. 0x%08X at addr %08X\n"),
readed, data, a );
return;
}
@ -215,9 +217,8 @@ flashmsbin( bus_t *bus, FILE *f )
l -= 4;
}
}
printf( "\n" );
printf( "Done.\n" );
printf( _("\nDone.\n") );
cfi_array_free( cfi_array );
}
@ -233,20 +234,20 @@ flashmem( bus_t *bus, FILE *f, uint32_t addr )
flashcheck( bus, &cfi_array );
if (!cfi_array || !flash_driver) {
printf( "no flash driver found\n" );
printf( _("no flash driver found\n") );
return;
}
cfi = &cfi_array->cfi_chips[0]->cfi;
erased = malloc( cfi->device_geometry.erase_block_regions[0].number_of_erase_blocks * sizeof *erased );
if (!erased) {
printf( "Out of memory!\n" );
printf( _("Out of memory!\n") );
return;
}
for (i = 0; i < cfi->device_geometry.erase_block_regions[0].number_of_erase_blocks; i++)
erased[i] = 0;
printf( "program:\n" );
printf( _("program:\n") );
adr = addr;
while (!feof( f )) {
uint32_t data;
@ -257,15 +258,15 @@ flashmem( bus_t *bus, FILE *f, uint32_t addr )
if (!erased[block_no]) {
flash_unlock_block( bus, adr );
printf( "\nblock %d unlocked\n", block_no );
printf( "erasing block %d: %d\n", block_no, flash_erase_block( bus, adr ) );
printf( _("\nblock %d unlocked\n"), block_no );
printf( _("erasing block %d: %d\n"), block_no, flash_erase_block( bus, adr ) );
erased[block_no] = 1;
}
bn = fread( b, 1, BSIZE, f );
for (bc = 0; bc < bn; bc += flash_driver->buswidth) {
int j;
printf( "addr: 0x%08X\r", adr );
printf( _("addr: 0x%08X\r"), adr );
fflush( stdout );
data = 0;
@ -276,7 +277,7 @@ flashmem( bus_t *bus, FILE *f, uint32_t addr )
data |= b[bc + j] << (j * 8);
if (flash_program( bus, adr, data )) {
printf( "\nflash error\n" );
printf( _("\nflash error\n") );
return;
}
adr += flash_driver->buswidth;
@ -287,7 +288,7 @@ flashmem( bus_t *bus, FILE *f, uint32_t addr )
flash_readarray( bus );
fseek( f, 0, SEEK_SET );
printf( "verify:\n" );
printf( _("verify:\n") );
fflush( stdout );
adr = addr;
while (!feof( f )) {
@ -299,7 +300,7 @@ flashmem( bus_t *bus, FILE *f, uint32_t addr )
if (fread( buf, flash_driver->buswidth, 1, f ) != 1) {
if (feof(f))
break;
printf( "Error during file read.\n" );
printf( _("Error during file read.\n") );
return;
}
@ -310,16 +311,16 @@ flashmem( bus_t *bus, FILE *f, uint32_t addr )
else
data |= buf[j] << (j * 8);
printf( "addr: 0x%08X\r", adr );
printf( _("addr: 0x%08X\r"), adr );
fflush( stdout );
readed = bus_read( bus, adr );
if (data != readed) {
printf( "\nverify error:\nreaded: 0x%08X\nexpected: 0x%08X\n", readed, data );
printf( _("\nverify error:\nreaded: 0x%08X\nexpected: 0x%08X\n"), readed, data );
return;
}
adr += flash_driver->buswidth;
}
printf( "\nDone.\n" );
printf( _("\nDone.\n") );
free( erased );

@ -29,6 +29,8 @@
*
*/
#include <config.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
@ -155,25 +157,25 @@ amd_flash_print_info( bus_t *bus )
cid = bus_read( bus, 0x01 << o ) & 0xFFFF;
prot = bus_read( bus, 0x02 << o ) & 0xFF;
amd_flash_read_array( bus ); /* AMD reset */
printf( "Chip: AMD Flash\n\tManufacturer: " );
printf( _("Chip: AMD Flash\n\tManufacturer: ") );
switch (mid) {
case 0x0001:
printf( "AMD" );
printf( _("AMD") );
break;
default:
printf( "Unknown manufacturer (ID 0x%04x)", mid );
printf( _("Unknown manufacturer (ID 0x%04x)"), mid );
break;
}
printf( "\n\tChip: " );
printf( _("\n\tChip: ") );
switch (cid) {
case 0x22D7:
printf( "Am29LV640D/Am29LV641D/Am29LV642D" );
printf( _("Am29LV640D/Am29LV641D/Am29LV642D") );
break;
default:
printf ( "Unknown (ID 0x%04x)", cid );
printf ( _("Unknown (ID 0x%04x)"), cid );
break;
}
printf( "\n\tProtected: %04x\n", prot );
printf( _("\n\tProtected: %04x\n"), prot );
}
static int
@ -240,8 +242,8 @@ amd_flash_read_array( bus_t *bus )
flash_driver_t amd_32_flash_driver = {
4, /* buswidth */
"AMD/Fujitsu Standard Command Set",
"supported: AMD 29LV640D, 29LV641D, 29LV642D; 2x16 Bit",
N_("AMD/Fujitsu Standard Command Set"),
N_("supported: AMD 29LV640D, 29LV641D, 29LV642D; 2x16 Bit"),
amd_flash_autodetect,
amd_flash_print_info,
amd_flash_erase_block,

@ -33,6 +33,8 @@
*
*/
#include <config.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
@ -71,14 +73,14 @@ _intel_flash_print_info( bus_t *bus, int o )
mid = (bus_read( bus, 0x00 << o ) & 0xFF);
switch (mid) {
case STD_MIC_INTEL:
printf( "Manufacturer: %s\n", STD_MICN_INTEL );
printf( _("Manufacturer: %s\n"), STD_MICN_INTEL );
break;
default:
printf( "Unknown manufacturer (0x%04X)!\n", mid);
printf( _("Unknown manufacturer (0x%04X)!\n"), mid);
break;
}
printf( "Chip: " );
printf( _("Chip: ") );
cid = (bus_read( bus, 0x01 << o ) & 0xFFFF);
switch (cid) {
case 0x0016:
@ -109,7 +111,7 @@ _intel_flash_print_info( bus_t *bus, int o )
printf( "28F256K18\n" );
break;
default:
printf( "Unknown (0x%02X)!\n", cid );
printf( _("Unknown (0x%02X)!\n"), cid );
break;
}
@ -164,13 +166,13 @@ intel_flash_erase_block( bus_t *bus, uint32_t adr )
case 0:
return 0;
case CFI_INTEL_SR_ERASE_ERROR | CFI_INTEL_SR_PROGRAM_ERROR:
printf("flash: invalid command seq\n");
printf( _("flash: invalid command seq\n") );
return CFI_INTEL_ERROR_INVALID_COMMAND_SEQUENCE;
case CFI_INTEL_SR_ERASE_ERROR | CFI_INTEL_SR_VPEN_ERROR:
printf("flash: low vpen\n");
printf( _("flash: low vpen\n") );
return CFI_INTEL_ERROR_LOW_VPEN;
case CFI_INTEL_SR_ERASE_ERROR | CFI_INTEL_SR_BLOCK_LOCKED:
printf("flash: block locked\n");
printf( _("flash: block locked\n") );
return CFI_INTEL_ERROR_BLOCK_LOCKED;
default:
break;
@ -191,7 +193,7 @@ intel_flash_unlock_block( bus_t *bus, uint32_t adr )
while (!((sr = bus_read( bus, 0 ) & 0xFE) & CFI_INTEL_SR_READY)) ; /* TODO: add timeout */
if (sr != CFI_INTEL_SR_READY) {
printf("flash: unknown error while unblocking\n");
printf( _("flash: unknown error while unblocking\n") );
return CFI_INTEL_ERROR_UNKNOWN;
} else
return 0;
@ -209,7 +211,7 @@ intel_flash_program( bus_t *bus, uint32_t adr, uint32_t data )
while (!((sr = bus_read( bus, 0 ) & 0xFE) & CFI_INTEL_SR_READY)) ; /* TODO: add timeout */
if (sr != CFI_INTEL_SR_READY) {
printf("flash: unknown error while programming\n");
printf( _("flash: unknown error while programming\n") );
return CFI_INTEL_ERROR_UNKNOWN;
} else
return 0;
@ -285,8 +287,8 @@ intel_flash_readarray( bus_t *bus )
flash_driver_t intel_32_flash_driver = {
4, /* buswidth */
"Intel Standard Command Set",
"supported: 28Fxxxx, 2 x 16 bit",
N_("Intel Standard Command Set"),
N_("supported: 28Fxxxx, 2 x 16 bit"),
intel_flash_autodetect32,
intel_flash_print_info32,
intel_flash_erase_block32,
@ -297,8 +299,8 @@ flash_driver_t intel_32_flash_driver = {
flash_driver_t intel_16_flash_driver = {
2, /* buswidth */
"Intel Standard Command Set",
"supported: 28Fxxxx, 1 x 16 bit",
N_("Intel Standard Command Set"),
N_("supported: 28Fxxxx, 1 x 16 bit"),
intel_flash_autodetect,
intel_flash_print_info,
intel_flash_erase_block,

@ -200,7 +200,7 @@ readmem( bus_t *bus, FILE *f, uint32_t addr, uint32_t len )
uint8_t b[BSIZE];
if (!bus) {
printf( "Error: Missing bus driver!\n" );
printf( _("Error: Missing bus driver!\n") );
return;
}
@ -209,22 +209,22 @@ readmem( bus_t *bus, FILE *f, uint32_t addr, uint32_t len )
step = bus_width( bus, 0 ) / 8;
if (step == 0) {
printf( "Unknown bus width!\n" );
printf( _("Unknown bus width!\n") );
return;
}
addr = addr & (~(step - 1));
len = (len + step - 1) & (~(step - 1));
printf( "address: 0x%08X\n", addr );
printf( "length: 0x%08X\n", len );
printf( _("address: 0x%08X\n"), addr );
printf( _("length: 0x%08X\n"), len );
if (len == 0) {
printf( "length is 0.\n" );
printf( _("length is 0.\n") );
return;
}
printf( "reading:\n" );
printf( _("reading:\n") );
bus_read_start( bus, addr );
for (a = addr + step; a <= addr + len; a += step) {
uint32_t data;
@ -244,11 +244,11 @@ readmem( bus_t *bus, FILE *f, uint32_t addr, uint32_t len )
}
if ((bc >= BSIZE) || (a >= (addr + len)) ) {
printf( "addr: 0x%08X\r", a );
printf( _("addr: 0x%08X\r"), a );
fwrite( b, bc, 1, f );
bc = 0;
}
}
printf( "\nDone.\n" );
printf( _("\nDone.\n") );
}

@ -23,6 +23,8 @@
*
*/
#include <config.h>
#include "cable.h"
#include "parport.h"
#include "chain.h"
@ -95,7 +97,7 @@ arcom_set_trst( cable_t *cable, int trst )
cable_driver_t arcom_cable_driver = {
"ARCOM",
"Arcom JTAG Cable",
N_("Arcom JTAG Cable"),
generic_connect,
generic_disconnect,
generic_cable_free,

@ -31,6 +31,8 @@
*
*/
#include <config.h>
#include "cable.h"
#include "parport.h"
#include "chain.h"
@ -92,7 +94,7 @@ byteblaster_set_trst( cable_t *cable, int trst )
cable_driver_t byteblaster_cable_driver = {
"ByteBlaster",
"Altera ByteBlaster/ByteBlaster II/ByteBlasterMV Parallel Port Download Cable",
N_("Altera ByteBlaster/ByteBlaster II/ByteBlasterMV Parallel Port Download Cable"),
generic_connect,
generic_disconnect,
generic_cable_free,

@ -27,6 +27,8 @@
*
*/
#include <config.h>
#include "cable.h"
#include "parport.h"
#include "chain.h"
@ -92,7 +94,7 @@ dlc5_set_trst( cable_t *cable, int trst )
cable_driver_t dlc5_cable_driver = {
"DLC5",
"Xilinx DLC5 JTAG Parallel Cable III",
N_("Xilinx DLC5 JTAG Parallel Cable III"),
generic_connect,
generic_disconnect,
generic_cable_free,

@ -23,6 +23,8 @@
*
*/
#include <config.h>
#include "cable.h"
#include "parport.h"
#include "chain.h"
@ -95,7 +97,7 @@ ea253_set_trst( cable_t *cable, int trst )
cable_driver_t ea253_cable_driver = {
"EA253",
"ETC EA253 JTAG Cable",
N_("ETC EA253 JTAG Cable"),
generic_connect,
generic_disconnect,
generic_cable_free,

@ -23,6 +23,8 @@
*
*/
#include <config.h>
#include "cable.h"
#include "parport.h"
#include "chain.h"
@ -95,7 +97,7 @@ ei012_set_trst( cable_t *cable, int trst )
cable_driver_t ei012_cable_driver = {
"EI012",
"ETC EI012 JTAG Cable",
N_("ETC EI012 JTAG Cable"),
generic_connect,
generic_disconnect,
generic_cable_free,

@ -26,6 +26,8 @@
*
*/
#include <config.h>
#include "cable.h"
#include "parport.h"
#include "chain.h"
@ -100,7 +102,7 @@ keithkoep_set_trst( cable_t *cable, int trst )
cable_driver_t keithkoep_cable_driver = {
"KeithKoep",
"Keith & Koep JTAG cable",
N_("Keith & Koep JTAG cable"),
generic_connect,
generic_disconnect,
generic_cable_free,

@ -27,6 +27,8 @@
*
*/
#include <config.h>
#include "cable.h"
#include "parport.h"
#include "chain.h"
@ -97,7 +99,7 @@ mpcbdm_set_trst( cable_t *cable, int trst )
cable_driver_t mpcbdm_cable_driver = {
"MPCBDM",
"Mpcbdm JTAG cable",
N_("Mpcbdm JTAG cable"),
generic_connect,
generic_disconnect,
generic_cable_free,

@ -27,6 +27,8 @@
*
*/
#include <config.h>
#include "cable.h"
#include "parport.h"
#include "chain.h"
@ -99,7 +101,7 @@ wiggler_set_trst( cable_t *cable, int trst )
cable_driver_t wiggler_cable_driver = {
"WIGGLER",
"Macraigor Wiggler JTAG Cable",
N_("Macraigor Wiggler JTAG Cable"),
generic_connect,
generic_disconnect,
generic_cable_free,

Loading…
Cancel
Save