This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: convert elf-arm into srec2 with objcopy ?


Hi Benoît

: On sparc-sun-solaris2.6, i have generated Binutils for target
: arm-elf, I want to convert elf format into srec S2. I try it with
: this command:
:        arm-elf-objcopyr -O srec tnr2kg.axf tnr2kg.srec
: But the output file is in srec3, I need srec2.  So something is
: wrong with my configure or it must use an another.  I have search in
: Mailing List archive but I found nothing.

This is not a configuration problem.  In fact it may not be a solvable
problem at all.  BFD dynamically chooses the size of S-records it
produces depending upon the size of the addresses that it needs to
store in each S-record.  If the address fits with 16 bits (ie 0 <=>
0xffff) then it generates a type 1 S-record.  Otherwise, if the
address fits within 24 bits (0 <=> 0xffffff) then it generates a type
2 S-record, otherwise it generates a type 3 S-record.

Thus if you want to ensure that BFD will only generate type 2
S-records, you need to ensure that all addresses within your program
are in the range  0x10000 <=> 0xffffff.

Cheers
	Nick



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]