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

NAME

6       srec_msbin - Windows CE Binary Image Data Format
7

DESCRIPTION

9       This  format  is  the  output  of the Microsoft WinCE Platform Builder.
10       This is a binary (non‐text) file format.  File  names  in  this  format
11       typically (ambiguously) use the .bin suffix.
12
13   File Format
14       Files in this format start with a header record.
15
16       Then comes the data itself, organized into records.
17
18       The  file  finishes  with  an  execution start address record.  This is
19       mandatory.
20
21   File Header Record
22       Data in this format start with an optional header containing the  magic
23       “B000FF\n”,  followed  by  the  image start (four bytes, little endian)
24       address and the span of the image (highest address - lowest  address  +
25       1) (four bytes, little endian).  The file header does not have a check‐
26       sum; it is therefore possible that a corrupt file header will go  unde‐
27       tected.
28
29       ┌───────────┬────────────┬────────────┐
30       │Magic      │ Least      │ Greatest   │
31       │“B000FF\n” │ Address    │ Address    │
32       │(7 bytes)  │ (4 bytes)  │ (4 bytes)  │
33       └T─h─e─r─e──i─s──n─o─┴p─r─o─v─i─s─i─o─n──f─o─r┴─a──f─i─l─e──c─o─m─m─e┘nt of any kind.
34
35   Data Record
36       Each  record  consists  of  a  record start address (four bytes, little
37       endian), a record length (four bytes, little endian), a record checksum
38       (four  bytes,  little  endian),  followed by the record data.  The data
39       part of each record is raw byte values, no encoding.
40
41       ┌──────────┬───────────┬───────────┬───────────┐
42       │Start     │ Length    │ Checksum  │   Data    │
43       │address   │ (4 bytes) │ (4 bytes) │           │
44       │(4 bytes) │           │           │           │
45       └──────────┴───────────┴───────────┴───────────┘
46       The checksum is calculated by a simple sum of  unsigned  bytes  into  a
47       32‐bit accumulator.
48
49       The 12 record header bytes are not included in the record checksums; it
50       is therefore possible that a corrupt record header will go undetected.
51
52       It is not possible to place data at  address  zero  with  this  format.
53       Address zero is reserved for use by the execution start address record.
54
55       There  is  effectively no limit on the length of a record (2^32-1).  It
56       is not uncommon for a MsBin file to contain records with sizes  in  the
57       tens of megabytes.
58
59   Execution Start Address Record
60       Last  comes  a  special  record with the record address set to zero and
61       record length set to the image execution start address.   According  to
62       specification the record describing the execution start address must be
63       always present, and must always be the last record in the file.
64
65       ┌──────────┬───────────┬───────────┐
66       │Zero      │ Start     │ Checksum  │
67       │(4 bytes) │ Address   │ = 0       │
68       │          │ (4 bytes) │ (4 bytes) │
69       └──────────┴───────────┴───────────┘
70   Commentary
71       The MsBin files produced by SRecord are valid and can  be  successfully
72       parsed  by the command line utilities viewbin and cvrtbin (part of Win‐
73       dows CE platform).
74
75       For a MsBin file to be usable in Microsoft WinCE  Platform  Builder  it
76       has to contain a TOC meta‐structure.  This is data embedded in the file
77       by Microsoft WinCE Platform Builder itself.
78
79       The opposite conversion - from MsBin - comes in handy when analyzing  a
80       MsBin file (i.e. a WinCE image).
81
82   Size Multiplier
83       In general, binary data will expand in sized by approximately 1.0 times
84       (approaching asymptotically from above) when represented with this for‐
85       mat,  as  the  15‐byte  file  header is averaged over the data content.
86       Holes in the data will also increase the size.
87

SOURCE

89       http://msdn.microsoft.com/en-us/library/ms924510.aspx
90
92       srec_cat version 1.64
93       Copyright (C) 1998, 1999, 2000, 2001, 2002,  2003,  2004,  2005,  2006,
94       2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Peter Miller
95
96       The srec_cat program comes with ABSOLUTELY NO WARRANTY; for details use
97       the 'srec_cat -VERSion License' command.  This is free software and you
98       are  welcome  to  redistribute it under certain conditions; for details
99       use the 'srec_cat -VERSion License' command.
100

MAINTAINER

102       Scott Finneran   E‐Mail:   scottfinneran@yahoo.com.au
103       Peter Miller     E‐Mail:   pmiller@opensource.org.au
104
105
106
107Reference Manual                    SRecord                      srec_msbin(5)
Impressum