--- Begin Message ---
here is the description for Motorolla S-Record format :
note - objdump produces S3 format
Motorola S-Record Format
Motorola S-records are an industry-standard format for transmitting binary
files to target systems and PROM programmers. LSI
Logic have extended this standard to include an S4-record containing an
address and a symbol.
The extended S-record standard is as follows:
is the record type. Where:
0starting record (optional)
1data record with 16-bit address
2data record with 24-bit address
3data record with 32-bit address
4symbol record (LSI extension)
5number of data records in preceeding block
7ending record for S3 records
8ending record for S2 records
9ending record for S1 records
is two hex characters. This defines the length of the record in bytes
(not characters). It includes the address field, the data
field, and the checksum field.
is 4, 6, or 8 characters. Corresponding to a 16-, 24-, or 32-bit
address. The address field for S4 records is always 32 bits.
Are the data bytes. Each pair of hex characters represent one byte in
Is the symbol name. The symbol is terminated by a ','.
Is the one's complement of the 8-bit checksum.
The S0 record starts the file. The S3 records contain the data. The S7
record contains the entry address and terminates the
Joe George wrote:
> I am trying to move my development environment from DOS to Linux. I
> have got the tools installed from the rpm files with no problem and
> verified that code is being generated correctly by using objdump.
> The PC tools are gcc version 2.6-94q4, size, nm, and objcopy are
> 2.4-94q4. The following sequence in the makefile would generate an
> S record file:
> gcc -O -nostdlib -G 0 -DNR4K -Tscriptd -N -o mod_30k $(DOBJS)
> size -x mod_30k
> nm -n mod_30k > mod_30k.nm
> objcopy -O srec mod_30k mod_30k.txt
> Using the new tools on Linux generates an srec file with a different
> format. There is other stuff intermixed with the code. I have not
> been successful in finding info on the srec format. I would appreciate
> it if someone could point me to a specification of the output format
> or let me know if I'm doing something else wrong.
> Joe George
--- End Message ---