F-2
DINK32 PowerPC ISA Debugger User’s Manual
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
Specific Formats
Type: Describes the type of S-record entry. There are S0, S1, S2, S3, S5, S7, S8, and S9
types. This information is used to determine the format of the remainder of the characters
in the entry. The specific format for each S-record type is discussed in the next section.
Count: When the two characters comprising this field are interpreted as a hex value,
indicates the number of remaining character pairs in the record.
Address: These characters are interpreted as a hex address. They indicate the address where
the data is to be loaded into memory. The address may be interpreted as a 2, 3, or 4 bytes
address, depending on the type of record. 2-byte addresses require 4 characters, 3-byte
addresses require 6 characters, and 4-byte addresses require 8 characters.
Data: This field can have anywhere from 0 to 64 characters, representing 0-32 hexadecimal
bytes. These values will be loaded into memory at the address specified in the address field.
Checksum: These 2 characters are interpreted as a hexadecimal byte. This number is
determined as follows: Sum the byte values of each pair of hex digits in the count, address,
and data fields of the record. Take the one’s complement. The least significant byte of the
result is used as the checksum.
F.2
Specific Formats
Each of the record types has a slightly different format. These are all derived from the
general format specified above and are summarized in Table F-1.
Table F-1. SRecord Formats
Type
Description
S0
Contains header information for the S-record. This data isn’t actually loaded into memory. The address field
of an S0 record is unused and will contain 0x0000. The data field contains the header information, which is
divided into several sub-fields:
char[20] module name
char[2] version number
char[2] revision number
char[0-36] text comment
Each subfield is composed of ASCII characters. These are paired and interpreted as one byte hex values
in the case of the revision number and version number fields. For the module name and text comment fields
these values should be interpreted as hexadecimal values of ASCII characters.
S1
The address field is interpreted as a 2-byte address. The data in the record is loaded into memory at the
address specified.
S2
The address field is interpreted as a 3-byte address. The data in the record is loaded into memory at the
address specified.
S3
The address field is interpreted as a 4-byte address. The data in the record is loaded into memory at the
address specified.
S5
The address field is interpreted as a 2-byte value which represents a count of the number of S1, S2, and
S3 records previously transmitted. The data field is unused.
S7
The address field is interpreted as a 4-byte address and contains the execution start address. The data field
is unused.
F
Freescale Semiconductor, Inc.
n
.