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
|
'\" t
.\" srecord - manipulate eprom load files
.\" Copyright (C) 1998, 2000-2007 Peter Miller
.\"
.\" 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 3 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, see
.\" <http://www.gnu.org/licenses/>.
.\"
.ds n) srec_cat
.TH \*(n) 1 SRecord "Reference Manual"
.SH NAME
srec_cat \- manipulate eprom load files
.XX "srec_cat(1)" "manipulate eprom load files"
.SH SYNOPSIS
.B \*(n)
[
.IR option \&...
]
.IR filename \&...
.br
.B \*(n)
.B -Help
.br
.B \*(n)
.B -VERSion
.SH DESCRIPTION
The
.I \*(n)
program is used to assemble the given input files into a single output
file.
The use of filters (see below) allows significant manipulations to be
performed by this command.
.PP
A warning will be emitted for each address which is redundantly set to the
same value. A fatal error will be issued if any address is set with
contradictory values.
To suppress this behavior, use an \fB\-exclude \-within\fP filter.
.so o_input.so
.br
.ne 1i
.SH OPTIONS
The following options are understood:
.so o_at.so
.TP 8n
\fB\-Output\fP \fIfilename\fP [ \fIformat\fP ]
.RS
This option may be used to specify the output file to be used.
The special file name ``\-'' is understood to mean the standard output.
Output defaults to the standard output if this option is not used.
.PP
The \fIformat\fP may be specified as:
.TP 8n
\fB\-Absolute_Object_Module_Format\fP
An Intel Absolute Object Module Format file will be written.
(See
.IR srec_aomf (5)
for a description of this file format.)
.TP 8n
\fB\-Ascii_Hex\fP
An Ascii-Hex file will be written.
(See
.IR srec_ascii_hex (5)
for a description of this file format.)
.TP 8n
\fB\-ASM\fP [ \f[I]prefix\fP ][ \-\f[I]option\fP... ]
.RS
A series of assembler DB statements will be written.
.PP
The optional \fIprefix\fP may be specified to change the names of the
symbols generated. The defaults to "\f[CW]eprom\fP" if not set.
.PP
Several options are available to modify the style of output:
.TP 8n
\fB\-Dot_STyle\fP
Use "dot" style pseudo-ops instead of words.
For example \f[CW].byte\fP instead of the \f[CW]DB\fP default.
.TP 8n
\fB\-HEXadecimal_STyle\fP
Use hexadecimal numbers in the output,
rather than the default decimal numbers.
.TP 8n
\fB\-Section_STyle\fP
By default the generated assemble of placed at the correct address using
\f[CW]ORG\fP pseudo-ops. Section style output emits tables of section
addresses and lengths, so the data may be related at runtime.
.TP 8n
\fB\-A430\fP
Generate output which is compliant to the \f[CW]a430.exe\fP compiler as
it is used, \f[I]e.g.\fP in IAR Embedded Workbench.
This is short-hand for \-section-style \-hex-style
.TP 8n
\fB\-CL430\fP
Generate output which is Code Composer Essentials compliant,
\f[I]i.e.\fP the compiler of it.
This is short-hand for \-section-style \-hex-style \-dot-style
.TP 8n
\fB\-Output_Word\fP
Generate output which is in two-byte words rather than bytes. This
assumes little-endian words; you will need to use the \-Byte-Swap filter
if your target is big-endian.
No attempt is made to align the words onto even address boundaries;
use and input filter such as
.nf
.in +8n
\f[I]input-file\fP \-fill 0xFF -within \f[I]input-file\fP -range-pad 2
.in -8n
.fi
to pad the data to whole words first.
.RE
.TP 8n
\fB\-Atmel_Generic\fP
An Atmel Generic file will be written.
(See
.IR srec_atmel_generic (5)
for a description of this file format.)
.TP 8n
\fB\-BASic\fP
A series of BASIC DATA statements will be written.
.TP 8n
\fB\-B-Record\fP
A Freescale MC68EZ328 Dragonball bootstrap b-record format file will be written.
(See
.IR srec_brecord (5)
for a description of this file format.)
.TP 8n
\fB\-Binary\fP
A raw binary file will be written.
If you get unexpected results \f[B]please\fP see the
\f[I]srec_binary\fP(5) manual for more information.
.TP 8n
\fB\-C-Array\fP [ \f[I]identifier\fP ][ \-\f[I]option\fP... ]
.RS
A C array defintion will be written.
.PP
The optional \fIidentifier\fP is the name of the variable to be defined,
or \f[CW]bugus\fP if not specified.
.TP 8n
\fB\-INClude\fP
This option asks for an include file to be generated as well.
.TP 8n
\fB\-No-CONST
This options asks for the variables to not use the const
keyword (they are declared constant be default, so that they are placed
into the read-only segment in embedded systems).
.TP 8n
\fB\-C_COMpressed\fP
These options ask for an compressed c-array whose memory
gaps will not be filled.
.TP 8n
\fB\-Output_Word\fP
This option asks for an output which is in words not in
bytes. This is little endian, so you may need to
use the \-Swap-bytes filter. Filler bytes of 0xFF may be inserted
if necessary; use \-fill \-range-pad for a different value.
.TP 8n
\fB\-DECimal_STyle\fP
This option may be used to get decimal constants in the output, rather
than the default hexadecimal constants.
.RE
.TP 8n
\fB\-COsmac\fP
An RCA Cosmac Elf format file will be written.
(See \fIsrec_cosmac\fP(5) for a description of this file format.)
.TP 8n
\fB\-Dec_Binary\fP
A DEC Binary (XXDP) format file will be written.
(See
.IR srec_dec_binary (5)
for a description of this file format.)
.TP 8n
\fB\-Elektor_Monitor52\fP
This option says to use the EMON52 format file when writing the file.
(See
.IR srec_emon52 (5)
for a description of this file format.)
.TP 8n
\fB\-FAIrchild\fP
This option says to use the Fairchild Fairbug format file when writing the file.
(See \fIsrec_fairchild\fP(5) for a description of this file format.)
.TP 8n
\fB\-Fast_Load\fP
This option says to use the LSI Logic Fast Load format file when writing
the file.
(See \fIsrec_fastload\fP(5) for a description of this file format.)
.TP 8n
\fB\-Formatted_Binary\fP
A Formatted Binary format file will be written.
(See \fIsrec_formatted_binary\fP(5) for a description of this file format.)
.TP 8n
\fB\-Four_Packed_Code\fP
This option says to use the PFC format file when writing the file.
(See
.IR srec_fpd (5)
for a description of this file format.)
.TP 8n
\fB\-HEX_Dump
A human readable hexadecimal dump (including ASCII)
will be printed.
.TP 8n
\fB\-Intel\fP
An Intel hex format file will be written.
(See
.IR srec_intel (5)
for a description of this file format.)
The default is to emit 32-bit linear addressing;
if you want 16-bit extended segment addressing
use the \fB--address-length=2\fP option.
.TP 8n
\fB\-MOS_Technologies\fP
An Mos Technologies format file will be written.
(See
.IR srec_mos_tech (5)
for a description of this file format.)
.TP 8n
\fB\-Motorola\fP [ \fIwidth\fP ]
.RS
A Motorola S-Record file will be written.
(See
.IR srec_motorola (5)
for a description of this file format.)
This is the default output format.
By default, the smallest possible address length is emitted,
this will be S19 for data in the first 64KB;
if you wish to force S28 use the \fB--address-length=3\fP option;
if you wish to force S37 use the \fB--address-length=4\fP option
.PP
The optional \fIwidth\fP argument describes the number of bytes which
form each address multiple. For normal uses the default of one (1) byte
is appropriate. Some systems with 16-bit or 32-bit targets mutilate the
addresses in the file; this option will imitate that behavior.
Unlike most other parameters, this one cannot be guessed.
.RE
.TP 8n
\fB\-Needham_Hexadecimal\fP
This option says to use the Needham Electronics ASCII file format to
write the file. See \fIsrec_needham\fP(5) for a description of this
file format.
.TP 8n
\fB\-Ohio_Scientific\fP
This option says to use the Ohio Scientific hexadecimal format.
See \fIsrec_os65v\fP(5) for a description of this format.
.TP 8n
\fB\-SIGnetics\fP
This option says to use the Signetics hex format.
See \fIsrec_signetics\fP(5) for a description of this format.
.TP 8n
\fB\-SPAsm\fP
This option says to use the SPASM assembler output format (commonly used
by PIC programmers).
See \fIsrec_spasm\fP(5) for a description of this format.
.TP 8n
\fB\-SPAsm_LittleEndian\fP
This option says to use the SPASM assembler output format (commonly used
by PIC programmers). But with the data the other way around.
.TP 8n
\fB\-STewie\fP
A Stewie binary format file will be written.
(See
.IR srec_stewie (5)
for a description of this file format.)
.TP 8n
\fB\-Tektronix\fP
A Tektronix hex format file will be written.
(See
.IR srec_tektronix (5)
for a description of this file format.)
.TP 8n
\fB\-Tektronix_Extended\fP
A Tektronix extended hex format file will be written.
(See
.IR srec_tektronix_extended (5)
for a description of this file format.)
.TP 8n
\fB\-Texas_Instruments_Tagged\fP
A TI-Tagged format file will be written.
(See
.IR srec_ti_tagged (5)
for a description of this file format.)
.TP 8n
\fB\-Texas_Instruments_Tagged_16\fP
A Texas Instruments SDSMAC 320 format file will be written.
(See
.IR srec_ti_tagged_16 (5)
for a description of this file format.)
.TP 8n
\fB\-Texas_Instruments_TeXT\fP
This option says to use the Texas Instruments TXT (MSP430) format to
write the file. See \f[I]srec_ti_txt\fP(5) for a description of this
file format.
.TP 8n
\fB\-VHdl\fP [ \fIbytes-per-word\fP [ \fIname\fP ]]
A VHDL format file will be written.
The \fIbytes-per-word\fP defaults to one,
the \fIname\fP defaults to \f[CW]eprom\fP.
The \fIetc/x_defs_pack.vhd\fP file in the source distribution contains an
example ROM definitions pack for the type-independent output.
You may need to use the \-byte-swap filter to get the byte order you want.
.TP 8n
\fB\-VMem\fP [ \fImemory-width\fP ]
A Verilog VMEM format file will be written.
The \fImemory-width\fP may be 8, 16, 32, 64 or 128 bits;
.\"
.\" The default number of bits is 32.
.\" If you change this, you must also change the following files:
.\" lib/srec/arglex_output.cc
.\" lib/srec/output/file/vmem.cc
.\"
defaults to 32 if unspecified.
(See \fIsrec_vmem\fP(5) for a description of this file format.)
You may need to use the \-byte-swap filter to get the byte order you want.
.TP 8n
\fB\-WILson\fP
A wilson format file will be written.
(See
.IR srec_wilson (5)
for a description of this file format.)
.RE
.TP 8n
\fB\-Address_Length\fP \fInumber\fP
This option many be used to specify the minimum number of bytes to be
used in the output to represent an address (padding with leading zeros
if necessary).
This helps when talking to brain-dead EPROM programmers which do not
fully implement the format specification.
.TP 8n
.B \-Data_Only
This option may be used to suppress all output except data fields.
This helps when talking to brain-dead EPROM programmers which do not
fully implement the format specification.
.TP 8n
\fB\-IGnore_Checksums\fP
.so o_ignore_checksums.so
.so o_sequence.so
.TP 8n
.B \-CRLF
This option may be used to specify CRLF line termination for text
output. For use with brain-dead EPROM programmers which assume all the
world uses Evil Bill's operating system's line termination. The default
is to use the current operating system's default line termination.
Use this option with caution, because it will also introduce extra (i.e.
wrong) CR bytes into binary formats.
.TP 8n
\fB-Line_Length\fP \fInumber\fP
This option may be used to limit the length of the output lines to at
most \fInumber\fP characters. (Not meaningful for binary file format.)
Defaults to something less than 80 characters, depending on the format.
.TP 8n
\fB\-HEAder\fP \fIstring\fP
This option may be used to set the header comment,
in those formats which support it.
.TP 8n
\fB\-Start_Address\fP \fInumber\fP
This option may be used to set the start address,
in those formats which support it.
.so o_multiple.so
.PP
All other options will produce a diagnostic error.
.so z_options.so
.so z_exit.so
.so z_copyright.so
|