1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557
|
Read Me(SRecord) Read Me(SRecord)
NAME
SRecord - manipulate EPROM load files
DESCRIPTION
The SRecord package is a collection of powerful tools for manipulating
EPROM load files.
I wrote SRecord because when I was looking for programs to manipulate
EPROM load files, I could not find very many. The ones that I could
find only did a few of the things I needed. SRecord is written in C++
and polymorphism is used to provide the file format flexibility and
arbitrary filter chaining. Adding more file formats and filters is
relatively simple.
The File Formats
The SRecord package understands a number of file formats:
Ascii-Hex
The ascii-hex format is understood for both reading and
writing. (Also known as the ascii-space-hex format.)
ASM It is possible, for output only, to produce a serices of DB
statements containing the data. This can be useful for
embedding data into assembler programs. This format cannot be
read.
Atmel Generic
This format is produced by the Atmel AVR assembler. It is
understood for both reading and writing.
BASIC It is possible, for output only, to produce a serices of DATA
statements containing the data. This can be useful for
embedding data into BASIC programs. This format cannot be
read.
Binary Binary files can both be read and written.
C It is also possible to write a C array declaration which
contains the data. This can be useful when you want to embed
download data into C programs. This format cannot be read.
Cosmac The RCA Cosmac Elf format is understood for both reading and
writing.
DEC Binary
The DEC Binary (XXDP) format is understood for both reading and
writing.
Elektor Monitor (EMON52)
The EMON52 format is understood for both reading and writing.
Fairchild Fairbug
The Fairchild Fairbug format is understood for both reading and
writing.
LSI Logic Fast Load
The LSI Logic Fast Load format is understood for both reading
and writing.
Formatted Binary
The Formatted Binary format is understood for both reading and
writing.
Four Packed Code (FPC)
The FPC format is understood for both reading and writing.
Intel The Intel hexadecimal format is understood for both reading and
writing. (Also known as the Intel MCS-86 Object format.)
Intel AOMF
The Intel Absolute Object Module Format (AOMF) is understood
for both reading and writing.
Intel 16
The Intel hexadecimal 16 format is understood for both reading
and writing. (Also known as the INHX16 file format.)
MOS Technology
The MOS Technology hexadecimal format is understood for both
reading and writing.
Motorola S-Record
The Motorola hexadecimal S-Record format is understood for both
reading and writing. (Also known as the Exorciser, Exormacs or
Exormax format.)
The Needham Electronics ASCII file format is understood for noth
reading
and writing.
OS65V The Ohio Scientific hexadecimal format is understood for both
reading and writing.
Signetics
The Signetics format is understood for both reading and
writing.
SPASM The SPASM format is used by a variety of PIC programmers; it is
understood for both reading and writing.
Spectrum
The Spectrum format is understood for both reading and writing.
Tektronix (Extended)
The Tektronix hexadecimal format and the Tektronix Extended
hexadecimal format are both understood for both reading and
writing.
Texas Instruments Tagged
The Texas Instruments Tagged format is understood for both
reading and writing. (Also known as the TI-tagged or TI-SDSMAC
format.)
VHDL It is possible to write VHDL file. This is only supported for
output.
Verilog VMEM
It is possible to write a Verilog VMEM file suitable for
loading with $readmemh(). This format is supported for reading
and writing.
Wilson The Wilson format is understood for both reading and writing.
This mystery format was added for a mysterious type of EPROM
writer.
The Tools
The primary tools of the package are srec_cat and srec_cmp. All of the
tools understand all of the file formats, and all of the filters.
srec_cat
The srec_cat program may be used to catenate (join) EPROM load
files, or portions of EPROM load files, together. Because it
understands all of the input and output formats, it can also be
used to convert files from one format to another.
srec_cmp
The srec_cmp program may be use to compare EPROM load files, or
portions of EPROM load files, for equality.
srec_info
The srec_info program may be used to print summary information
about EPROM load files.
The Filters
The SRecord package is made more powerful by the concept of input
filters. Wherever an input file may be specified, filters may also be
applied to that input file. The following filters are available:
checksum
The checksum filter may be used to insert the checksum of the
data (bitnot, negative or positive) into the data.
byte swap
The byte swap filter may be used to swap pairs of add and even
bytes.
CRC The crc filters may be used to insert a CRC into the data.
checksum
The checksum filters may be used to insert a checksum into the
data. Positive, negative and bit-not checksums are available,
as well as big-endian and little-endian byte orders.
crop The crop filter may be used to isolate an input address range,
or ranges, and discard the rest.
exclude The exclude filter may be used to exclude an input address
range, or ranges, and keep the rest.
fill The fill filter may be used to fill any holes in the data with
a nominated value.
unfill The unfill filter may be used to make holes in the data at
bytes with a nominated value.
random fill
The random fill filter may be used to fill holes in the data
with random byte values.
length The length filter may be used to insert the data length into
the data.
maximum The maximum filter may be used to insert the maximum data
address into the data.
minimum The minimum filter may be used to insert the minimum data
address into the data.
offset The offset filter may be used to offset the address of data
records, both forwards and backwards.
split The split filter may be used to split EPROM images for wide
data buses or other memory striping schemes.
unsplit The unsplit filter may be reverse the effects of the split
filter.
More than one filter may be applied to each input file. Different
filters may be applied to each input file. All filters may be applied
to all file formats.
ARCHIVE SITE
The latest version of SRecord is available on the Web from:
URL: http://srecord.sourceforge.net/
File: srecord.html # the SRecord page
File: srecord-1.21.README # Description, from the tar file
File: srecord-1.21.lsm # Description, LSM format
File: srecord-1.21.spec # RedHat package specification
File: srecord-1.21.tar.gz # the complete source
File: srecord-1.21.pdf # Reference Manual
This Web page also contains a few other pieces of software written by
me. Please have a look if you are interested.
SRecord is also carried by sunsite.unc.edu in its Linux archives. You
will be able to find SRecord on any of its mirrors.
URL: ftp://sunsite.unc.edu/pub/Linux/apps/circuits/
File: srecord-1.21.README # Description, from the tar file
File: srecord-1.21.lsm # Description, LSM format
File: srecord-1.21.spec # RedHat package specification
File: srecord-1.21.tar.gz # the complete source
File: srecord-1.21.pdf # Reference Manual
This site is extensively mirrored around the world, so look for a copy
near you (you will get much better response).
FTP by EMail
For those of you without Web or FTP access, I recommend the use of an
ftp-by-email server. Here is a list of a few (there may be more):
ftpmail@cs.uow.edu.au Australia
ftpmail@ftp.uni-stuttgart.de Germany
ftpmail@grasp.insa-lyon.fr France
ftpmail@doc.ic.ac.uk Great Britain
ftpmail@ieunet.ie Ireland
ftpmail@sunsite.unc.edu USA
ftpmail@ftp.uu.net USA
In general, you can get a help message about how to use each system by
sending email with a subject of "help" and a message body containing
just the word "help".
BUILDING SRECORD
Full instructions for building SRecord may be found in the BUILDING
file included in this distribution.
It is also possible to build SRecord on Windows using the Cygwin
(www.cygwin.com) or DJGPP (www.delorie.com/djgpp) environments.
Instructions are in the BUILDING file, including how to get native
Windows binaries.
COPYRIGHT
srecord version 1.21
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Peter
Miller; All rights reserved.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111, USA.
It should be in the LICENSE file included with this distribution.
AUTHOR
Peter Miller E-Mail: millerp@canb.auug.org.au
/\/\* WWW: http://www.canb.auug.org.au/~millerp/
RELEASE NOTES
This section details the various features and bug fixes of the various
releases. For excruciating and complete detail, and also credits for
those of you who have generously sent me suggestions and bug reports,
see the etc/CHANGES.* files.
Version 1.21 (7-Feb-2005)
* More Doxygen comments have been added to the class header files.
* There is a new srec_cat --crlf option, which may be used for force
CRLF output on operating systems which don't use that style of line
termination.
* A number of problems with GCC, particularly with the early 3.x
series.
* There is a new "Stewie" format, an undocumented format loosely based
on the Motorola S-Record format, apparently used in mobile phones.
More information would be most welcome.
* A number of build problems have been fixed.
Version 1.20 (8-Feb-2004)
* The AOMF format now accepts (and ignores) more record types.
Version 1.19 (3-Jan-2004)
* It is now possible to set the start address in the output using the
srec_cat -Start_Address command line option.
* The Intel Absolute Object Module Format (AOMF) is now supported for
reading and writing.
* There is a new srec_cat -Random_Fill filter, like the srec_cat -Fill
filter except that it uses random values.
Version 1.18 (1-Jan-2004)
* The VMEM format is now able to output data for 64 and 128 bits wide
memories.
* A bug in the SRecord reference manuals has been fixed; the CRCxx had
a copy-and-paste glitch and always said big-endian where little endian
was intended half the time.
Version 1.17 (12-Oct-2003)
* There is now support for Intel Extended Segment aasddressing output,
via the --address-length=2 option.
* There is now support for output of Verilog VMEM format. See
srec_vmem(5) for more information.
* There is now support for reading and writing the INHX16 format, used
in various PIC programmers. It looks just like the Intel Hex format,
except that the bytes counts and the addresses refer to words (hi,lo)
rather than bytes. See srec_intel16(5) for more information.
Version 1.16 (28-Jul-2003)
* Some updates have been made to cope with GCC 3.2
Version 1.15 (16-Jun-2003)
* The Ascii-Hex implementation is now slightly more complete. I still
haven't found a definitive description.
* The Fairchild Fairbug format has been added for reading and writing.
See srec_fairchild(5) for more information.
* The Spectrum format has been added for reading and writing. See
srec_spectrum(5) for more information.
* The Formatted Binary format has been added for reading and writing.
See srec_formatted_binary(5) for more information.
* The RCA Cosmac Elf format has been added for reading and writing.
See srec_cosmac(5) for more information.
* The Needham EMP programmer format has been added for reading and
writing. See srec_needham(5) for more information.
Version 1.14 (11-Mar-2003)
* Numerous fixes have been made to header handling. It is now possible
to specify an empty header with the -header command line option.
* Some more GCC 3.2 build problems have been fixed.
Version 1.13 (5-Feb-2003)
* Bugs have been fixed in the Texas Instruments Tagged and VHDL
formats, which produced inconsistent output.
* A couple of build problems have been fixed.
* There are two new output formats for ASM and BASIC.
Version 1.12 (6-Dec-2002)
* It is now possible to put -minimum input.spec (also -maximum and
-length) almost anywhere on the command line that you can put a number.
It allows, for example, the -offset value to be calculated from the
maximum of the previous file. The values calculated by -Minimum,
-Maximum and -Length may also be rounded to arbitrary boundaries, using
-Round_Down, -Round_Nearest and -Round_Up.
* The malformed Motorola S5 records output by the Green Hills tool
chain are now understood.
Version 1.11 (21-Oct-2002)
* The Ohio Scientific OS65V audio tape format has been added for
reading and writing. See srec_os65v(5) for more information.
* Some build problems have been fixed.
Version 1.10 (14-Jun-2002)
* The Intel format now emits the redundant extended linear address
record at the start of the file; some loaders couldn't cope without it.
* The Binary format now copes with writing to pipes.
* The Motorola format now understands the S6 (24-bit data record count)
records for reading and writing.
* The DEC Binary format now works correctly on Windows machines.
* The LSI Logic Fast Load format is now understood for both reading and
writing. See srec_fastload(5) for more information.
Version 1.9 (27-Nov-2001)
* The DEC Binary (XXDP) format is now understood for both reading and
writing. See srec_dec_binary(5) for more information.
* The Elektor Monitor (EMON52) format is now understood for both
reading and writing. See srec_emon52(5) for more information.
* The Signetics format is now understood for both reading and writing.
See srec_signetics(5) for more information.
* The Four Packed Code (FPC) format is now understood for both reading
and writing. See srec_fpc(5) for more information.
* Wherever possible, header data is now passed through by srec_cat(1).
There is also a new srec_cat -header option, so that you can set the
header comment from the command line.
* The Atmel Generic format for Atmel AVR programmers is now understood
for both reading and writing. See srec_atmel_generic(5) for more
information.
* The handling of termination records has been improved. It caused
problems for a number of filters, including the -fill filter.
* A bug has been fixed in the checksum calculations for the Tektronix
format.
* There is a new SPASM format for PIC programmers. See srec_spasm(5)
for more information.
Version 1.8 (20-Apr-2001)
* There is a new ``unfill'' filter, which may be used to perform the
reverse effect of the ``fill'' filter.
* There is a new bit-wise NOT filter, which may be used to invert the
data.
* A couple of bugs have been fixed in the CRC filters.
Version 1.7 (19-Mar-2001)
* The documentation is now in PDF format. This was in order to make it
more accessible to a wider range of people.
* There is a new srec_cat --address-length option, so that you can set
the length of the address fields in the output file. For example, if
you always want S3 data records in a Motorola hex file, use --address-
length=4. This helps when talking to brain-dead EPROM programmers
which do not fully implement the format specification.
* There is a new --multiple option to the commands, which permits an
input file to contain multiple (contradictory) values for some memory
locations. The last value in the file will be used.
* A problem has been fixed which stopped SRecord from building under
Cygwin.
* A bug has been fixed in the C array output. It used to generate
invalid output when the input had holes in the data.
Version 1.6 (3-Dec-2000)
* A bug has been fixed in the C array output. (Holes in the input
caused an invalid C file to be produced.)
* There is are new CRC input filters, both 16-bit and 32-bit, both big
and little endian. See srec_cat(1) for more information.
* There is a new VHDL output format.
* There are new checksum filters: in addition to the existing one's
complement (bitnot) checksum filter, there are now negative and
positive checksum filters. See srec_cat(1) for more information.
* The checksum filters are now able to sum over 16-bit and 32-bit
values, in addition to the existing byte sums.
* The srec_cmp program now has a --verbose option, which gives more
information about how the two inputs differ. See srec_cmp(1) for more
information.
Version 1.5 (6-Mar-200)
* There is now a command line option to guess the input file format;
all of the tools understand this option.
* The ``MOS Technologies'' file format is now understood for reading
and writing. See srec_mos_tech(5) for more information.
* The ``Tektronix Extended'' file format is now understood for reading
and writing. See srec_tektronix_extended(5) for more information.
* The ``Texas Instruments Tagged'' file format is now understood for
reading and writing. (Also known as the TI-Tagged or SDSMAC format.)
See srec_ti_tagged(5) for more information.
* The ``ascii-hex'' file format is now understood for reading and
writing. (Also known as the ascii-space-hex format.) See
srec_ascii_hex(5) for more information.
* There is a new byte swap input filter, allowing pairs of odd and even
input bytes to be swapped. See srec_cat(1) for more information.
* The ``wilson'' file format is now understood for reading and writing.
This mystery format was added for a mysterious type of EPROM writer.
See srec_wilson(5) for more information.
* The srec_cat program now has a -data-only option, which supresses all
output except for the data records. This helps when talking to brain-
dead EPROM programmers which barf at anything but data. See
srec_cat(1) for more information.
* There is a new -Line-Length option for the srec_cat program, allowing
you to specify the maximum width of output lines. See srec_cat(1) for
more information.
Version 1.4 (13-Jan-2000)
* SRecord can now cope with CRLF sequences in Unix files. This was
unfortunately common where the file was generated on a PC, but SRecord
was being used on Unix.
Version 1.3 (12-May-1999)
* A bug has been fixed which would cause the crop and exclude filters
to dump core sometimes.
* A bug has been fixed where binary files were handled incorrectly on
Windows NT (acually, any system in which text files aren't the same as
binary files).
* There are three new data filters. The --OR filter, which may be used
to bit-wise OR a value to each data byte; the --AND filter, which may
be used to bit-wise AND a value to each data byte; and the --eXclusive-
OR filter, which may be used to bit-wise XOR a value to each data byte.
See srec_cat(1) for more information.
Version 1.2 (4-Nov-1998)
* This release includes file format man pages. The web page also
includes a PostScript reference manual, containing all of the man
pages.
* The Intel hex format now has full 32-bit support. See srec_intel(5)
for more information.
* The Tektronix hex format is now supported (only the 16-bit version,
Extended tektronix hex is not yet suppported). See srec_tektronix(5)
for more information.
* There is a new split filter, useful for wide data buses and memory
striping, and a complementary unsplit filter to reverse it. See
srec_cat(1) for more information.
Version 1.1 (22-Mar-1998)
First public release.
Reference Manual SRecord Read Me(SRecord)
|