Everything
3.6.1 Structure of the Motorola S-record file

The Motorola S-record file consists of seven recordsNote 1: S0 record as the header record, S1, S2, and S3 records as the data record, and S9, S8, and S7 records as the end recordsNote 2.

Note 1.

Each record is output in ASCII code.

Note 2.

The Motorola S-record files are divided into three types: 16-bit address type, (24-bit) standard address type, and 32-bit address type. The format of the 16-bit address type consists of S0, S1, and S9 records, the format of the standard address type consists of S0, S2, and S8 records, and the format of the 32-bit address type consists of S0, S3, and S7 records.

 

The structure and contents of the Motorola S-record file are shown below.

Figure 3.2

Structure of Motorola S-record File

 

Output Information

Description

S0 record

File name

S1 record

Value of code

S2 record

Value of code

S3 record

Value of code

S7 record

Entry point address

S8 record

Entry point address

S9 record

Entry point address

 

Each record consists of the following fields.

Sx  XX  YY......YY  SS  NL
(1) (2)     (3)     (4) (5)

Number

Description

(1)

Record type

S0: S0 record

S1: S1 record

S2: S2 record

S3: S3 record

S4: S4 record

S5: S5 record

S6: S6 record

S7: S7 record

S8: S8 record

S9: S9 record

(2)

Record length

The number of bytes as 2-digit hexadecimal number of (3) + number of bytes expressed by "SS"Note is expressed.

(3)

Field

(4)

Checksum

The one's complement is obtained from the sum of the number of 2-digit hexadecimal bytes in the record except for Sx, SS, and NL, and the lower one byte of the one's complement is expressed as a 2-digit hexadecimal number.

(5)

Newline (\n)

Note

This is 1.