I MOTOROLA S-RECORDS

The locator by default generates three types of S-records: S0, S2 and S8. With a the -f2S1 or -f2S3 option you can force other types of S-records. They have the following layout:

S0 - record

A locator generated S-record file starts with a S0 record with the following contents:

The S0 record is a comment record and does not contain relevant information for program execution.

The length_byte represents the number of bytes in the record, not including the record type and length byte.

The checksum is calculated by first adding the binary representation of the bytes following the record type (starting with the length_byte) to just before the checksum. Then the one's complement is calculated of this sum. The least significant byte of the result is the checksum. The sum of all bytes following the record type is 0xFF.

S1 - record

With the -f2S1 option of the locator, the actual program code and data is supplied with S1 records, with the following layout:

This record is used for 2-byte addresses.

Example:

The locator has an option that controls the length of the output buffer for generating S1 records. The default buffer length is 32 code bytes.

The checksum calculation of S1 records is identical to S0.

S2 - record

With the -f2S2 option of the locator, which is the default, the actual program code and data is supplied with S2 records, with the following layout:

For the TriCore the locator generates 3-byte addresses.

Example:

The locator has an option that controls the length of the output buffer for generating S2 records. The default buffer length is 32 code bytes.

The checksum calculation of S2 records is identical to S0.

S3 - record

With the -f2S3 option of the locator, the actual program code and data is supplied with S3 records, with the following layout:

This record is used for 4-byte addresses.

Example:

The locator has an option that controls the length of the output buffer for generating S3 records.

The checksum calculation of S3 records is identical to S0.

S7 - record

With the -f2S3 option of the locator, at the end of an S-record file, the locator generates an S7 record, which contains the program start address. S7 is the corresponding termination record for S3 records.

Layout:

Example:

The checksum calculation of S7 records is identical to S0.

S8 - record

With the -f2S2 option of the locator, which is the default, at the end of an S-record file, the locator generates an S8 record, which contains the program start address.

Layout:

Example:

The checksum calculation of S8 records is identical to S0.

S9 - record

With the -f2S1 option of the locator, at the end of an S-record file, the locator generates an S9 record, which contains the program start address. S9 is the corresponding termination record for S1 records.

Layout:

Example:

The checksum calculation of S9 records is identical to S0.


Copyright © 2002 Altium BV