SRecord 1.65

The SRecord package is a collection of powerful tools for manipulating EPROM load files. It was written by Peter Miller and continues to be maintained by Scott Finneran. This website, very much a product of its time is kept as close as possible to Peter's original in memoriam.

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, see the Reference Manual.

[ Download | Mailing List ]
[ Sourceforge: Project | Statistics ]

SRecord runs on almost any flavor of UNIX. The source distribution is self configuring using CMake.

SRecord also runs on Windows and builds under MSYS2. You can also build SRecord for Windows using Cygwin or DJGPP. See the BUILDING instructions for details.


The File Formats

The SRecord package understands a huge 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 series of DB statements containing the data. This can be useful for embedding data into assembler programs.

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 series of DATA statements containing the data. This can be useful for embedding data into BASIC programs.

Binary
Binary files can both be read and written.

B-Record
Files in Freescale Dragonball bootstrap b-record format can be read and written.

C Array
It is possible, for output only, to produce a C array definition containing the data. This can be useful for embedding data into other programs.

Coefficient File format
The Coefficient File Format (.coe) by Xilinx is understood for writing only.

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 (XXDP) format is understood for both reading and writing.

Four Packed Code (FPC)
The FPC format is understood for both reading and writing.

Hexdump
It is possible, for output only, to produce a simple hexadecimal listing. This can be useful for developer debugging.

HP64000 Absolute
The HP64000 Absolute is understood for reading only.

IDT/sim
The IDT/sim binary file 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.)

Logisim
The Logisim format is understood for reading and writing.

Memory Initialization Format
The Memory Initialization Format (.mem) format by Lattice Semiconductor is understood for writing only.

MIF
The Memory Initialization File (MIF) format by Altera is understood for both reading and writing.

MIPS-Flash
The MIPS Flash file format is understood for both reading and writing.

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.)

MsBin
The Windows CE Binary Image Data Format is supported both for reading and writing.

Needham Electronics
The Needham Electronics ASCII file format is understood for both reading and writing.

Ohio Scientific (OS65V)
The Ohio Scientific hexadecimal format is understood for both reading and writing.

PPB
The Stag Prom Programmer binary format is understood for both reading and writing.

PPX
The Stag Prom Programmer 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 understood for both reading and writing.

Texas Instruments Tagged
The Texas Instruments Tagged hexadecimal format is understood for both reading and writing (both 8 and 16 bits). Also known as the TI-Tagged or TI-SDSMAC object format.

ti-txt
The TI-TXT format is understood for reading and writing. This format is used with the bootstrap loader of the Texas Instruments MSP430 family of processors.

TRS-80
The Radio Shack TRS-80 object file format is understood for reading and writing.

VHDL
It is possible, for output only, to produce a VHDL definition containing the data. This can be useful for some embedded development systems.

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.

If you have a description of other EPROM load file formats that SRecord does not yet understand, please let me know, and they can be added.

The manual pages are also available from this web site.

The Tools

A number of tools are include in the SRecord package. 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. It also understands filters, see below.

srec_cmp
The srec_cmp program may be used 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 manual pages are also available from this web site.

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 are only some of the filters are available:

crc
The various crc filters may be used to insert an inustry standard cyclic redundancy check (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 holes in the data with a given byte value.

unfill
The unfill filter may be used to make holes in the data for bytes with a given 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.

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 used to 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.

There are many more filters available, see the srec_input(1) man page for more information.

The Generators

The SRecord package is made more powerful by the concept of input generators. Wherever an input file may be specified, a generator may be specified instead. The following generators are available:

constant
The constant generator may be used to create constant value bytes.

random
The random generator may be used to create random bytes.

repeated data
The repeated data generator may be used to create data which repeats a sequence of byte values over and over again.

Generators and data files can be combined on the same command line.

The Library

The project includes a shared library. The documentation for this library is available here on the web site. The shared library may be used to read and write all of the formats, and use all of the filters, in your own projects. It also makes the installed executables smaller.

Documentation

See Also

For a similar idea, applied to text files rather than EPROM load files, see the Uncia project.
For a similar idea, applied to file systems rather than EPROM load files, see the PlasticFS project.
For a similar idea, applied to archive files (tar, cpio, ar) rather than EPROM load files, see the Tardy project.
SRecord is maintained by Scott Finneran <scottfinneran@yahoo.com.aud> and is freely distributable under the terms and conditions of the GNU GPL. There is more Software by Peter Miller at his home page.

SourceForge.net Logo This page is hosted by SourceForge.