2003-02-17 Marcel Telka <marcel@telka.sk>

* src/jtag.c (jtag_parse_line): Added new 'get signal' command.
	* src/help.c (help): Added help for new 'get signal' command.


git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@365 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Marcel Telka 22 years ago
parent 81517fc322
commit f7b02f3290

@ -1,3 +1,8 @@
2003-02-17 Marcel Telka <marcel@telka.sk>
* src/jtag.c (jtag_parse_line): Added new 'get signal' command.
* src/help.c (help): Added help for new 'get signal' command.
2003-02-17 Marcel Telka <marcel@telka.sk>
* data/intel/pxa250/pxa250: Changed comment.

@ -1,7 +1,7 @@
$Id$
* Enhanced 'dr' command functionality.
* Added new 'set signal' command.
* Added new 'set signal' and 'get signal' commands.
* Added support for Mpcbdm JTAG Cable (Christian Pellegrin).
* Added support for Arcom JTAG Cable (patch 682310, Ian Campbell).
* Added support for all 6 static memory banks for Intel SA1110 (bug 682660).

@ -1,6 +1,5 @@
$Id$
* Add 'get signal' command.
* Add support for non-IDCODE-capable parts.
* Support for display the result of a boundary scan formated according to the CPU definitions (e.g. MA[0-26] = 0x00001c00).
* Remove direct relation between JTAG instruction and data register (e.g. ARM7TDMI).

@ -53,6 +53,7 @@ help( const char *cmd )
"readmem read content of the memory and write it to file\n"
"flashmem burn flash memory with data from a file\n"
"set set external signal value\n"
"get get external signal value\n"
"script run command sequence from external file\n"
"\n"
"Type \"help COMMAND\" for details about particular command.\n", PACKAGE
@ -189,7 +190,14 @@ help( const char *cmd )
);
for (i = 0; flash_drivers[i]; i++)
printf( "%s\n %s\n", flash_drivers[i]->name, flash_drivers[i]->description );
}
} else if (strcmp( cmd, "get" ) == 0)
printf(
"Usage: get signal PART SIGNAL\n"
"Get signal state from output BSR (Boundary Scan Register).\n"
"\n"
"PART part number (see print command)\n"
"SIGNAL signal name (from JTAG declaration file)\n"
);
else if (strcmp( cmd, "set" ) == 0)
printf(
"Usage: set signal PART SIGNAL DIR [DATA]\n"

@ -650,11 +650,65 @@ jtag_parse_line( char *line )
} else
data = 0;
if (get_token( NULL )) {
printf( "set: syntax error\n" );
return 1;
}
part_set_signal( ps->parts[n], s, dir, data );
return 1;
}
if (strcmp( t, "get" ) == 0) {
int n;
int data;
if (!cable) {
printf( "Error: Cable not configured. Use 'cable' command first!\n" );
return 1;
}
if (!ps) {
printf( "Run \"detect\" first.\n" );
return 1;
}
t = get_token( NULL );
if (!t || strcmp( t, "signal" ) != 0) {
printf( "get: syntax error\n" );
return 1;
}
t = get_token( NULL );
if (!t) {
printf( "get: syntax error\n" );
return 1;
}
n = strtol( t, &t, 10 );
if (t && *t) {
printf( "get: syntax error\n" );
return 1;
}
if ((n < 0) || (n >= ps->len)) {
printf( "get: invalid part number\n" );
return 1;
}
t = get_token( NULL ); /* signal name */
if (!t || get_token( NULL )) {
printf( "get: syntax error\n" );
return 1;
}
data = part_get_signal( ps->parts[n], t );
if (data != -1)
printf( "%s = %d\n", t, data );
return 1;
}
if (strcmp( t, "script" ) == 0) {
t = get_token( NULL ); /* filename */
if (!t) {

Loading…
Cancel
Save