linux-mips-fnet
[Top] [All Lists]

[Fwd: S record file format]

To: "linux-mips@fnet.fr" <linux-mips@fnet.fr>
Subject: [Fwd: S record file format]
From: Rabeeh Khoury <rabeeh@galileo.co.il>
Date: Wed, 29 Mar 2000 17:03:07 -0500
Sender: rabeeh@galileo.co.il
--- Begin Message ---
To: Joe George <joeg@clearcore.net>
Subject: Re: S record file format
From: Rabeeh Khoury <rabeeh@mail.galileo.co.il>
Date: Wed, 29 Mar 2000 15:38:41 -0500
References: <38E13D7F.7ACB8939@clearcore.net>
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:

S<type><length><address><data....><checksum>
S4<length><address><name>,<checksum>

Where:

type
    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
    6unused
    7ending record for S3 records
    8ending record for S2 records
    9ending record for S1 records

length
    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.

address
    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.

data
    Are the data bytes. Each pair of hex characters represent one byte in
memory.

name
    Is the symbol name. The symbol is terminated by a ','.

checksum
    Is the one's complement of the 8-bit checksum.

Example

S0030000FC
.
.
S325000004403C0880018D08DD900000000011000026000000003C0880012508DC50C50000B401

S32500000460C50100B8C50200BCC50300C0C50400C4C50500C8C50600CCC50700D0C50800D4FA

S32500000480C50900D8C50A00DCC50B00E0C50C00E4C50D00E8C50E00ECC50F00F0C51000F49A

S325000004A0C51100F8C51200FCC5130100C5140104C5150108C516010CC5170110C518011434

.
.
S70500000000FA

The S0 record starts the file. The S3 records contain the data. The S7
record contains the entry address and terminates the
download.


Joe George wrote:

> Hi,
>
> 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.
>
> Thanks,
>
> Joe George
> ClearCore


--- End Message ---
<Prev in Thread] Current Thread [Next in Thread>
  • [Fwd: S record file format], Rabeeh Khoury <=