This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
modification proposal in Binutils
- To: binutils at sourceware dot cygnus dot com
- Subject: modification proposal in Binutils
- From: "Luciano Gemme" <Luciano dot Gemme at marconi dot com>
- Date: Fri, 8 Sep 2000 17:14:44 +0200
Technology Innovation
From: Luciano Gemme@MCMAIN on 08/09/2000 17:14 CED
To: binutils@sourceware.cygnus.com
cc:
Subject: modification proposal in Binutils
Messrs binutils@sourceware.cygnus.com
Object: changes in binutils 2.10.90
===========================
Hi,
I've brought a little change in objcopy.c and srec.c in order to add a
parameter (--srec-len). This allows to change the length of the S3 records
when the srec output is choiced.
I've done this, because with our application it's impossible to download
a number of data byte not multiple of 4 (as the flash chip are).
Otherwise a S3 more long make the download faster (actually we use --srec-len
112)
Enclose to the mail you can find the modified files and the compiled version
for Windows. All the changes are marked with "start/end SREC_LEN changes"
remark.
I've change also the objcopy.1 file.
I'll be very happy if you could insert these changhes in a future release.
I also quote the diff from the original and my files
objcopy.c
==========
217a218,220
> /*
.........................................................................start
SREC_LEN changes */
> #define OPTION_SREC_LEN (OPTION_REDEFINE_SYM + 1)
> /*
.........................................................................end
SREC_LEN changes */
292a296,298
> /*
.........................................................................start
SREC_LEN changes */
> {"srec-len", required_argument, 0, OPTION_SREC_LEN},
> /*
.........................................................................end
SREC_LEN changes */
303a310,314
> /*
.........................................................................start
SREC_LEN changes */
> /* srec lenght. it's declared in srec.c and scan be modified by
> the srec-len parameter */
> extern unsigned int Chunk;
> /*
.........................................................................end
SREC_LEN changes */
304a316,317
> /*
.........................................................................SREC_LEN
changes */
> /* .....................added help for --srec-len (I couldn't put a comment
inside a string!)*/
352a366
> --srec-len <number> Set the lenght of a S3 record (for srec
output only)\n\
2129a2144,2149
>
> /*
.........................................................................start
SREC_LEN changes */
> case OPTION_SREC_LEN:
> Chunk = parse_vma (optarg, "--srec-len");
> break;
> /*
.........................................................................start
SREC_LEN changes */
srec.c
======
174,175c174,181
< #define CHUNK = 0x70;
<
---
>
> /*
.........................................................................start
SREC_LEN changes */
> /* #define CHUNK 16 */
> #define DEFAULT_CHUNK 16
> /* For a 0x75 byte record you must write CHUNK 0x70 */
> /* global variable eventually modified by command parameter --srec-len */
> unsigned int Chunk = 0;
> /*
.........................................................................end
SREC_LEN changes */
1004a1011,1017
> /*
.........................................................................start
SREC_LEN changes */
> /* use default chunk lenght if no len parameter has been done */
> if (Chunk == 0)
> { Chunk = DEFAULT_CHUNK;
> }
> /*
.........................................................................end
SREC_LEN changes */
>
1010,1011c1023,1028
< if (octets_this_chunk > CHUNK)
< octets_this_chunk = CHUNK;
---
> /*
.........................................................................start
SREC_LEN changes */
> /* if (octets_this_chunk > CHUNK) */
> /* octets_this_chunk = CHUNK; */
> if (octets_this_chunk > Chunk)
> octets_this_chunk = Chunk;
> /*
.........................................................................start
SREC_LEN changes */
objcopy.1
=========
51a52
> .RB "[\|" \-\-srec\-len=\fIval\fR "\|]"
291a293,296
> .TP
> .B \fB\-\-srec\-len=\fIval
> Meaningful only for srec output. Set the length of the S3 records to \fIval\fP
.
> This length concerns address, data and crc fields.
(See attached file: srec_len_report.txt)(See attached file: srec.c)(See attached
file: objcopy.c)(See attached file: objcopy.1)
---------------------------------------------------------------------------------------
Gemme Luciano
email: luciano.gemme@marconi.com
ON-SDH Sw Technology Manager
SDH Sw Technology Innovation and Support Group
----------------------------------------------------------------------------------------
"Any sufficiently advanced technology is indistinguishable from magic."
Arthur C.
Clarke, The Worlds of 2001
---------------------------------------------------------------------------------------
Gemme Luciano
ON-SDH Sw Technology Manager
SDH Sw Technology Innovation and Support Group
Intranet web site: sdhswdev
----------------------------------------------------------------------------------------
"Any sufficiently advanced technology is indistinguishable from magic."
Arthur C.
Clarke, The Worlds of 2001
Messrs binutils@sourceware.cygnus.com
Object: changes in binutils 2.10.90
===========================
Hi,
I've brought a little change in objcopy.c and srec.c in order to add a
parameter (--srec-len). This allows to change the length of the S3 records
when the srec output is choiced.
I've done this, because with our application it's impossible to download
a number of data byte not multiple of 4 (as the flash chip are).
Otherwise a S3 more long make the download faster (actually we use --srec-len 112)
Enclose to the mail you can find the modified files and the compiled version
for Windows. All the changes are marked with "start/end SREC_LEN changes" remark.
I've change also the objcopy.1 file.
I'll be very happy if you could insert these changhes in a future release.
I also quote the diff from the original and my files
objcopy.c
==========
217a218,220
> /* .........................................................................start SREC_LEN changes */
> #define OPTION_SREC_LEN (OPTION_REDEFINE_SYM + 1)
> /* .........................................................................end SREC_LEN changes */
292a296,298
> /* .........................................................................start SREC_LEN changes */
> {"srec-len", required_argument, 0, OPTION_SREC_LEN},
> /* .........................................................................end SREC_LEN changes */
303a310,314
> /* .........................................................................start SREC_LEN changes */
> /* srec lenght. it's declared in srec.c and scan be modified by
> the srec-len parameter */
> extern unsigned int Chunk;
> /* .........................................................................end SREC_LEN changes */
304a316,317
> /* .........................................................................SREC_LEN changes */
> /* .....................added help for --srec-len (I couldn't put a comment inside a string!)*/
352a366
> --srec-len <number> Set the lenght of a S3 record (for srec output only)\n\
2129a2144,2149
>
> /* .........................................................................start SREC_LEN changes */
> case OPTION_SREC_LEN:
> Chunk = parse_vma (optarg, "--srec-len");
> break;
> /* .........................................................................start SREC_LEN changes */
srec.c
======
174,175c174,181
< #define CHUNK = 0x70;
<
---
>
> /* .........................................................................start SREC_LEN changes */
> /* #define CHUNK 16 */
> #define DEFAULT_CHUNK 16
> /* For a 0x75 byte record you must write CHUNK 0x70 */
> /* global variable eventually modified by command parameter --srec-len */
> unsigned int Chunk = 0;
> /* .........................................................................end SREC_LEN changes */
1004a1011,1017
> /* .........................................................................start SREC_LEN changes */
> /* use default chunk lenght if no len parameter has been done */
> if (Chunk == 0)
> { Chunk = DEFAULT_CHUNK;
> }
> /* .........................................................................end SREC_LEN changes */
>
1010,1011c1023,1028
< if (octets_this_chunk > CHUNK)
< octets_this_chunk = CHUNK;
---
> /* .........................................................................start SREC_LEN changes */
> /* if (octets_this_chunk > CHUNK) */
> /* octets_this_chunk = CHUNK; */
> if (octets_this_chunk > Chunk)
> octets_this_chunk = Chunk;
> /* .........................................................................start SREC_LEN changes */
objcopy.1
=========
51a52
> .RB "[\|" \-\-srec\-len=\fIval\fR "\|]"
291a293,296
> .TP
> .B \fB\-\-srec\-len=\fIval
> Meaningful only for srec output. Set the length of the S3 records to \fIval\fP
.
> This length concerns address, data and crc fields.
srec.c
objcopy.c
objcopy.1