
4 Debugging Your BSP
4.2 Basic Debugging Techniques
119
4
S21400002057696E64205269766572205379737465D9
...
...
S2140366400000000E000000010000000F0000000024
S2140366500000000000000000000000000000000032
S21403666000137708001377080000000000000000FE
S804000000FB
The following is a sample of what each line contains:
S 2 14 000000 48 00 00 39 60 00 00 00 48 00 00 3D 43 6F 70 79 EA
S – indicates the file is an S- record file
In the second byte:
1 – indicates the file uses 16-bit addressing
2 – indicates the file uses 24-bit addressing
3 – indicates the file uses 32-bit addressing
The next two bytes are record length in hexadecimal.
14 – indicates 16 data bytes + 1 checksum byte + 3 address bytes for a total of
0x14 bytes.
The next few bytes provide the address at which the data will be placed. How
many bytes is determined by the second byte, as described above. In this case, the
second byte is 2, indicating that the file uses 24-bit addresses, or six bytes in the file.
000000 – indicates the address
The remainder of the line contains data.
There is a simple calculation that can be used to help check the validity of this file.
Subtract the last address from the first address and get the size of the data to be
programmed.
To obtain the first address, look at the second line in the hex file.
To obtain the last address, look at the second-to-last line in the hex file. The two
lines of the sample file are presented below, with spaces inserted between the fields
for clarity.
S 2 14 000000 48000039600000004800003D436F7079EA
S 2 14 036660 00137708001377080000000000000000FE
036660 – indicates the starting address of the last data line of the hex file. However,
the data on that line fills through the 0x3666f address. Therefore, the end of the
data is at the 0x36670 address.
Kommentare zu diesen Handbüchern