1srec_cmp(1)                 General Commands Manual                srec_cmp(1)
2
3
4

NAME

6       srec_cmp - compare two EPROM load files for equality
7

SYNOPSIS

9       srec_cmp [ option...  ] filename...
10       srec_cmp -Help
11       srec_cmp -VERSion
12

DESCRIPTION

14       The srec_cmp program is used to compare two EPROM load files for equal‐
15       ity.  This comparison is performed irrespective of the  load  order  of
16       the data in each of the files.
17

INPUT FILE SPECIFICATIONS

19       Input  may  be  qualified in two ways: you may specify a data file or a
20       data generator.  format and you may specify filters to apply  to  them.
21       An input file specification looks like this:
22              data‐file [ filter ... ]
23              data‐generator [ filter ... ]
24
25   Data Files
26       Input  from  data  files is specified by file name and format name.  An
27       input file specification looks like this:
28              filename [ format ][ -ignore‐checksums ]
29       The default format is Motorola S‐Record format,  but  many  others  are
30       also understood.
31
32   Data Generators
33       It  is also possible to generate data, rather than read it from a file.
34       You may use a generator anywhere you could use a file.  An input gener‐
35       ator specification looks like this:
36              -GENerate address‐range -data‐source
37       Generators include random data and various forms of constant data.
38
39   Common Manual Page
40       See  srec_input(1)  for  complete  details  of  input specifiers.  This
41       description is in a separate manual page because it is common  to  more
42       than one SRecord command.
43

OPTIONS

45       The following options are understood:
46
47       @filename
48               The  named  text file is read for additional command line argu‐
49               ments.  Arguments are separated by  white  space  (space,  tab,
50               newline,  etc).   There  is no wildcard mechanism.  There is no
51               quoting mechanism.  Comments, which start with '#'  and  extend
52               to the end of the line, are ignored.  Blank lines are ignored.
53
54       -Help
55               Provide some help with using the srec_cmp program.
56
57       -IGnore_Checksums
58               The  -IGnore‐Checksums  option  may be used to disable checksum
59               validation of input files, for those formats which have  check‐
60               sums  at  all.  Note that the checksum values are still read in
61               and parsed (so it is still an error if they  are  missing)  but
62               their  values  are not checked.  Used after an input file name,
63               the option affects that file alone; used anywhere else  on  the
64               command line, it applies to all following files.
65
66       -Enable_Sequence_Warnings
67               This  option  may  be used to enable warnings about input files
68               where the data records are not in  strictly  ascending  address
69               order.  Only one warning is issued per input file.  This is the
70               default.
71
72               Note: the output of srec_cat(1) is always in this order.
73
74               Note: This option must be used before the input file.  This  is
75               because  if  there  are several files on the command line, each
76               may need different settings.   The  setting  remains  in  force
77               until the next -Disable_Sequence_Warnings option.
78
79       -Disable_Sequence_Warnings
80               This  option  may be used to disable warnings about input files
81               where the data records are not in  strictly  ascending  address
82               order.
83
84               Note: This option must be used before the offending input file.
85               This is because if there are several files on the command line,
86               each may need different settings.  The setting remains in force
87               until the next -Ensable_Sequence_Warnings option.
88
89       -redundant‐bytes=value
90               Use this option to permit a file to  contain  redundant  values
91               for  some  memory locations.  The default is for this condition
92               to be a warning.
93
94               ignore
95                   No warning or error is issued whena redundant settings  are
96                   detected.
97
98               warning
99                   A warning is issued when a redundant settings are observed,
100                   the warning includes the problematic address.
101
102               error
103                   A fatal error is  issued  when  a  redundant  settings  are
104                   observed,  the fatal error message includes the problematic
105                   address and byte value.
106
107       -contradictory‐bytes=value
108               Use this option to permit a file to contain contradictory  val‐
109               ues  for some memory locations.  The last value in the input(s)
110               will be used.  The default is for this condition to be a  fatal
111               error.
112
113               ignore
114                   No warning or error is issued when contradictory setting is
115                   detected.
116
117               warning
118                   A warning is  issued  when  a  vontradictory  settings  are
119                   observed, the warning includes the problematic address, and
120                   values.
121
122               error
123                   A fatal error is issued  when  contradictory  settings  are
124                   observed,  the fatal error message includes the problematic
125                   address and byte values.
126
127       -VERSion
128               Print the version of the srec_cmp program being executed.
129
130       -Verbose
131               This option may be used to obtain more  information  about  how
132               and  where  the  two files differ.  Please note that this takes
133               longer, and the output can be voluminous.
134
135       All other options will produce a diagnostic error.
136
137       All options may be abbreviated; the abbreviation is documented  as  the
138       upper  case  letters,  all  lower  case letters and underscores (_) are
139       optional.  You must use consecutive sequences of optional letters.
140
141       All options are case insensitive, you may type them in  upper  case  or
142       lower case or a combination of both, case is not important.
143
144       For example: the arguments “-help”, “-HEL” and “-h” are all interpreted
145       to mean the -Help option.  The argument “-hlp” will not be  understood,
146       because consecutive optional characters were not supplied.
147
148       Options  and  other  command line arguments may be mixed arbitrarily on
149       the command line.
150
151       The GNU long option names are understood.  Since all option  names  for
152       srec_cmp  are  long,  this  means  ignoring the extra leading “-”.  The
153--option=value” convention is also understood.
154

EXIT STATUS

156       The srec_cmp command will exit with a status of 1 on  any  error.   The
157       srec_cmp  command  will  only  exit  with a status of 0 if there are no
158       errors.
159

EXAMPLE

161       A common use for the srec_cmp command is to verify  that  a  particular
162       signature is present in the code.  In this example, the signature is in
163       a file called “signature[rq], and the EPROM image is in a  file  called
164       “image[rq].  We assume they are both Motorola S‐Record format, although
165       this will work for all formats:
166              srec_cmp signature  image -crop -within signature
167       The signature need not be at the start of memory, nor need  it  be  one
168       single  contiguous piece of memory.  In the above example, the portions
169       of the image which have the same address range  as  the  signature  are
170       compared with the signature.
171
173       srec_cmp version 1.64
174       Copyright  (C)  1998,  1999,  2000, 2001, 2002, 2003, 2004, 2005, 2006,
175       2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Peter Miller
176
177       The srec_cmp program comes with ABSOLUTELY NO WARRANTY; for details use
178       the 'srec_cmp -VERSion License' command.  This is free software and you
179       are welcome to redistribute it under certain  conditions;  for  details
180       use the 'srec_cmp -VERSion License' command.
181

MAINTAINER

183       Scott Finneran   E‐Mail:   scottfinneran@yahoo.com.au
184       Peter Miller     E‐Mail:   pmiller@opensource.org.au
185
186
187
188Reference Manual                    SRecord                        srec_cmp(1)
Impressum