User’s Manual
M68HC12A4EVB Evaluation Board — Rev. 1
118
S-Record Format
MOTOROLA
S-Record Format
Each byte of binary data is encoded in the S record as a 2-character hexadecimal
number:
•
The first character represents the high-order four bits of the byte.
•
The second character represents the low-order four bits of the byte.
The five fields that comprise an S record are shown in
Table A-1
.
The S-record fields are described in
Table A-2
.
Each record may be terminated with a CR/LF/NULL. Additionally, an S record
may have an initial field to accommodate other data such as line number
generated by some time-sharing systems.
Accuracy of transmission is ensured by the record length (byte count) and
checksum fields.
Table A-1. S-Record Fields
Type
Record
Length
Address
Code/Data
Checksum
Table A-2. S-Record Field Contents
Field
Printable
Characters
Contents
Type
2
S-record type — S0, S1, etc.
Record
Length
2
Character pair count in the record, excluding the
type and record length.
Address
4, 6, or 8
2-, 3-, or 4-byte address at which the data field is
to be loaded into memory.
Code/Data
0 – 2n
From 0 to n bytes of executable code, memory
loadable data, or descriptive information. For
compatibility with teletypewriter, some programs
may limit the number of bytes to as few as 28
(56 printable characters in the S record).
Checksum
2
Least significant byte of the one’s complement of
the sum of the values represented by the pairs of
characters making up the record length,
address, and the code/data fields.
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
.
..
AR
CH
IVE
D B
Y F
RE
ES
CA
LE
SE
MI
CO
ND
UC
TO
R,
IN
C.