Initial xloong code
[xloong.git] / doc / html / srec.htm
blobb388c129cc4b289f6296316b681d2811407592d9
1 <html>
3 <head>
4 <title>Motorola S-Record Format</title>
5 </head>
7 <body>
9 <h1 align="left">Motorola S-Record Format</h1>
10 <!--INDEX symbols "S3 records" "S4 records" "Motorola S-records" -->
11 <!--INDEX "S-record format" -->
13 <p>Motorola S-records are an industry-standard format for transmitting binary files to
14 target systems and PROM programmers. LSI Logic have extended this standard to include an
15 S4-record containing an address and a symbol. </p>
17 <p>The extended S-record standard is as follows:</p>
19 <pre>
21 S&lt;type&gt;&lt;length&gt;&lt;address&gt;&lt;data....&gt;&lt;checksum&gt;
23 S4&lt;length&gt;&lt;address&gt;&lt;name&gt;,&lt;checksum&gt;
25 </pre>
27 <p>Where:
29 <dl>
30 <dt><b>type </b></dt>
31 <dd>is the record type. Where:
32 <dl compact>
33 <dt>0 starting record (optional) </dt>
34 <dt>1 data record with 16-bit address </dt>
35 <dt>2 data record with 24-bit address </dt>
36 <dt>3 data record with 32-bit address </dt>
37 <dt>4 symbol record (LSI extension) </dt>
38 <dt>5 number of data records in preceeding block </dt>
39 <dt>6 unused </dt>
40 <dt>7 ending record for S3 records </dt>
41 <dt>8 ending record for S2 records </dt>
42 <dt>9 ending record for S1 records </dt>
43 </dl>
44 </dd>
45 <dt><b>length </b></dt>
46 <dd>is two hex characters. This defines the length of the record in bytes (not characters).
47 It includes the address field, the data field, and the checksum field. </dd>
48 <dt><b>address </b></dt>
49 <dd>is 4, 6, or 8 characters. Corresponding to a 16-, 24-, or 32-bit address. The address
50 field for S4 records is always 32 bits. </dd>
51 <dt><b>data </b></dt>
52 <dd>Are the data bytes. Each pair of hex characters represent one byte in memory.</dd>
53 <dt><b>name </b></dt>
54 <dd>Is the symbol name. The symbol is terminated by a ','.</dd>
55 <dt><b>checksum</b> </dt>
56 <dd>Is the one's complement of the 8-bit checksum.</dd>
57 </dl>
59 <h2>Example</h2>
61 <pre>
63 S0030000FC
69 S325000004403C0880018D08DD900000000011000026000000003C0880012508DC50C50000B401
71 S32500000460C50100B8C50200BCC50300C0C50400C4C50500C8C50600CCC50700D0C50800D4FA
73 S32500000480C50900D8C50A00DCC50B00E0C50C00E4C50D00E8C50E00ECC50F00F0C51000F49A
75 S325000004A0C51100F8C51200FCC5130100C5140104C5150108C516010CC5170110C518011434
81 S70500000000FA
83 </pre>
85 <p>The S0 record starts the file. The S3 records contain the data. The S7 record contains
86 the entry address and terminates the download.</p>
88 <h2>See Also</h2>
89 <blockquote>
90 <p><a href="frec.htm">fast load</a> format definition.</p>
91 </blockquote>
92 <hr>
93 <p> <b>Navigation:</b> <a href="pmon.htm">Document Home</a> | <a href="doctoc.htm">Document
94 Contents</a> | <a href="docindex.htm">Document Index</a></p>
95 <p><!--$Id: srec.htm,v 1.1.1.1 2006/09/14 01:59:06 root Exp $ --> </p>
96 </body>
97 </html>