1srec_stewie(5)                File Formats Manual               srec_stewie(5)
2
3
4

NAME

6       srec_stewie - Stewie's binary file format
7

DESCRIPTION

9       If you have a URL for documentation of this format, please let me know.
10
11       Any  resemblance  to  the Motorola S-Record is superficial, and extends
12       only to the data records.  The header records and  termination  records
13       are  completely different.  None of the other Motorola S-Records record
14       type are available.
15
16   The Records
17       All records start with an ASCII capital S character, value  0x53,  fol‐
18       lowed by a type specifier byte.  All records consist of binary bytes.
19
20   The Header Record
21       Each file starts with a fixed four byte header record.
22
23                             ┌─────┬──────┬──────┬──────┐
24                             │0x53 │ 0x30 │ 0x30 │ 0x33 │
25                             └─────┴──────┴──────┴──────┘
26   The Data Records
27       Each data record consists of 5 fields. These are the type field, length
28       field, address field, data field, and the checksum.  The  lines  always
29       start with a capital S character.
30
31              ┌─────┬──────┬───────────────┬─────────┬──────┬──────────┐
32              │0x53 │ Type │ Record Length │ Address │ Data │ Checksum │
33              └─────┴──────┴───────────────┴─────────┴──────┴──────────┘
34       Type    The  type  field is a one byte field that specifies whether the
35               record has  a  two-byte  address  field  (0x31),  a  three-byte
36               address  field (0x32) or a four-byte address field (0x33).  The
37               address is big-endian.
38
39       Record Length
40               The record length field is a one byte field that specifies  the
41               number of bytes in the record following this byte.
42
43       Address This  is  a  2-,  3- or 4-byte address that specifies where the
44               data in the record is to be loaded into memory.
45
46       Data    The data field contains the  executable  code,  memory-loadable
47               data or descriptive information to be transferred.
48
49       Checksum
50               The checksum is a one byte field that represents the least sig‐
51               nificant byte of the one's complement of the sum of the  values
52               represented  by  the  bytes  making  up  the  record's  length,
53               address, and data fields.
54
55   The Termination Record
56       Each file ends with a fixed two byte termination record.
57
58                                    ┌─────┬──────┐
59                                    │0x53 │ 0x38 │
60                                    └─────┴──────┘
61   Size Multiplier
62       In general, binary data will expand in sized by approximately 1.2 times
63       when represented with this format.
64

EXAMPLE

66       Here  is  an  hex-dump  example  file.   It  contains the data ``Hello,
67       World'' to be loaded at address 0.
68              0000: 53 30 30 33 53 31 10 00 00 48 65 6C 6C 6F 2C 20  S003S1...Hello,
69              0010: 57 6F 72 6C 64 0A 9D 53 38                       World..S8
70
72       srec_cat version 1.35
73       Copyright (C) 1998, 1999, 2000, 2001, 2002,  2003,  2004,  2005,  2006,
74       2007 Peter Miller
75
76       The srec_cat program comes with ABSOLUTELY NO WARRANTY; for details use
77       the 'srec_cat -VERSion License' command.  This is free software and you
78       are  welcome  to  redistribute it under certain conditions; for details
79       use the 'srec_cat -VERSion License' command.
80

AUTHOR

82       Peter Miller   E-Mail:   millerp@canb.auug.org.au
83       /\/\*             WWW:   http://www.canb.auug.org.au/~millerp/
84
85
86
87Reference Manual                    SRecord                     srec_stewie(5)
Impressum