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

* src/jtag.c (jtag_parse_line) <script>: Added support for `quit' command in scripts.
	(jtag_parse_rc): Ditto.
	(jtag_parse_file): Added support for comments and `quit' command in scripts.
	(main): Added command line parameter list execution as scripts.
	* data/intel/pxa250/STEPPING: Added support for Intel PXA255 A0 (thanks to Mike Sprauve).
	* configure.ac (AC_INIT): Changed version number to 0.3.1.


git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@401 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Marcel Telka 22 years ago
parent 3e1b91019a
commit 2e6e74b04d

@ -1,3 +1,12 @@
2003-03-18 Marcel Telka <marcel@telka.sk>
* src/jtag.c (jtag_parse_line) <script>: Added support for `quit' command in scripts.
(jtag_parse_rc): Ditto.
(jtag_parse_file): Added support for comments and `quit' command in scripts.
(main): Added command line parameter list execution as scripts.
* data/intel/pxa250/STEPPING: Added support for Intel PXA255 A0 (thanks to Mike Sprauve).
* configure.ac (AC_INIT): Changed version number to 0.3.1.
2003-03-18 Marcel Telka <marcel@telka.sk>
* po/POTFILES.in: Added src/tap/parport/direct.c and src/tap/parport/ppdev.c.

@ -1,5 +1,9 @@
$Id$
* Added support for Intel PXA255 A0 (thanks to Mike Sprauve).
* Added support for running scripts specified as jtag command line parameters.
* Added support for comments in scripts. Lines started with `#' are treated as
comments.
* Added support for Linux ppdev parallel port driver. Non-root users can
use JTAG Tools now.
* Added new `bsdl2jtag' conversion tool (Matan Ziv-Av).

@ -49,7 +49,7 @@ JTAG-aware parts (chips):
- Hitachi SH7727
- Intel IXP425
- Intel SA1110
- Intel PXA250 (including C0 stepping)
- Intel PXA250/PXA255
- Intel PXA261/262
- Xilinx XC2C256-TQ144
- Xilinx XCR3128XL-CS144

@ -21,7 +21,7 @@
# Written by Marcel Telka <marcel@telka.sk>, 2002.
#
AC_INIT(jtag,0.3)
AC_INIT(jtag,0.3.1)
AC_PREREQ(2.54)
AC_COPYRIGHT([Copyright (C) 2002, 2003 ETC s.r.o.])

@ -22,7 +22,7 @@
#
# Documentation:
# [1] Intel Corporation, "Intel PXA250 and PXA210 Application Processors
# Specification Update", June 2002, Order Number: 278534-007
# Specification Update", February 2003, Order Number: 278534-012
#
# bits 31-28 of the Device Identification Register
@ -33,3 +33,4 @@
0011 pxa250 B1
0100 pxa250 B2
0101 pxa250c0 C0
0110 pxa250c0 PXA255A0

@ -693,6 +693,8 @@ jtag_parse_line( char *line )
}
if (strcmp( t, "script" ) == 0) {
int go;
t = get_token( NULL ); /* filename */
if (!t) {
printf( _("script: missing filename\n") );
@ -703,9 +705,10 @@ jtag_parse_line( char *line )
return 1;
}
jtag_parse_file( t );
return 1;
go = jtag_parse_file( t );
if (go < 0)
printf( _("Unable to open file `%s'!\n"), t );
return go;
}
printf( _("%s: unknown command\n"), t );
@ -741,13 +744,11 @@ jtag_parse_file( const char *filename )
int n = 0;
f = fopen( filename, "r" );
if (!f) {
printf( _("Unable to open file `%s'!\n"), filename);
return 1;
}
if (!f)
return -1;
while (getline( &line, &n, f ) != -1)
if (strlen(line) > 0)
while (go && (getline( &line, &n, f ) != -1))
if ((strlen(line) > 0) && (line[0] != '#'))
go = jtag_parse_line(line);
free(line);
@ -756,18 +757,19 @@ jtag_parse_file( const char *filename )
return go;
}
static void
static int
jtag_parse_rc( void )
{
char *home = getenv( "HOME" );
char *file;
int go;
if (!home)
return;
return 1;
file = malloc( strlen(home) + strlen(JTAGDIR) + strlen(RCFILE) + 3 ); /* 2 x "/" and trailing \0 */
if (!file)
return;
return 1;
strcpy( file, home );
strcat( file, "/" );
@ -775,14 +777,19 @@ jtag_parse_rc( void )
strcat( file, "/" );
strcat( file, RCFILE );
jtag_parse_file( file );
go = jtag_parse_file( file );
free( file );
return go;
}
int
main( void )
main( int argc, const char **argv )
{
int go = 1;
int i;
#ifdef ENABLE_NLS
/* l10n support */
setlocale( LC_MESSAGES, "" );
@ -807,20 +814,32 @@ main( void )
printf( _("Warning: %s may damage your hardware! Type \"quit\" for exit!\n\n"), PACKAGE );
printf( _("Type \"help\" for help.\n\n") );
/* Create ~/.jtag */
jtag_create_jtagdir();
for (i = 1; i < argc; i++) {
go = jtag_parse_file( argv[i] );
if (go < 0)
printf( _("Unable to open file `%s'!\n"), argv[i] );
if (!go)
break;
}
if (go) {
/* Create ~/.jtag */
jtag_create_jtagdir();
/* Parse and execute the RC file */
jtag_parse_rc();
/* Parse and execute the RC file */
go = jtag_parse_rc();
/* Load history */
jtag_load_history();
if (go) {
/* Load history */
jtag_load_history();
/* main loop */
jtag_readline_loop( "jtag> " );
/* main loop */
jtag_readline_loop( "jtag> " );
/* Save history */
jtag_save_history();
/* Save history */
jtag_save_history();
}
}
chain_free( chain );

Loading…
Cancel
Save