SREC(1)

NAME
srec - Convert Motorola S-Record hex files to and from binary

SYNOPSIS
srec -e [options] [input...] srec -d [options] [input [output]] srec --help srec --version

DESCRIPTION
srec(1) converts binary files to Motorola S-Record hex files and vice versa.

OPTIONS

-e, --encode
    Convert a binary stream to a srec file. This is the default if neither -e nor -d is specified.

-d, --decode
    Convert a srec file to a binary stream.

-i string
    Set the input file name. Default is stdin. When encoding, this option can be used multiple times to combine several binary files into one srec file.

-o string
    Set the output file name. Default is stdout. When decoding each occurance of '#' will be replaced by a hex digit of the base address of the chunk contained in that file. When encoding, this option must precede the first -i option on the command line.

-c string
    Set an input file for encoding and assume that the file is an srec file. This does a simple pass through conversion (file consistency is not checked but checksums are recalculated). This option is invalid when decoding. For encoding it can be used mutliple times to merge multiple srec files into one.

-f address filename
    Encode the file filename at address adress. This option is shorthand for a -a option followed by a -i option. When decoding the address is ignored (making the option equivalent to the -i option).

-a, --address int
    Set the base address for the next input file when encoding.

-m, --module-name string
    Set the module name to be encoded in the header record.

-n, --record-size int
    Set the maximum record size for encoding.

-p, --start-address int
    Set the starting execution address when encoding.

--help
    Print usage information

--version
    Print version information

SEE ALSO
ihex(1)

AUTHOR
Hampa Hug <hampa@hampa.ch>