rom960 ROM Image Builder
The rom960 ROM image builder interprets commands either from a
configuration file or from standard input. The invocation command
is:
rom960 [
-option ]... [ config_file [ script-arg
]...]...
Each option must be preceded by a -
character. (On DOS, you can also use a /
character.) The options are listed below.
A configuration file must be given without its .ld
extension. The configuration file is searched for lines beginning
with #*.
This prefix is stripped, and script arguments are substituted.
The first script argument in the invocation is substituted for
each occurrence of $0,
the second for each occurrence of $1,
and so on. After script argument substitution, the invocation
command is interpreted and executed.
If the config_file
is omitted, rom960 reads commands from stdin;
no argument substitution is done.
Options
- h
Displays help information to stdout
and exits.
- V
Displays the version number and copyright date to standard error
and continues.
- v960
Displays the version number and copyright date
to standard error and exits.
Commands
- checksum image
start-addr end-addr 16 |
32 checksum-addr
Computes a 16- or 32-bit crc checksum over the address
range from start-addr
to end-addr
(inclusive) and stores it at the designated checksum
address.
- help
Displays help information to stdout
and continues.
- ihex image
output_intel_hex_file
[ mode16 | mode32 ]
Translates a binary ROM image to Intel hex format
suitable for downloading to an intelligent PROM programmer. The
optional mode16
argument produces extended segment address records; mode32
(the default) produces extended linear address records.
- map object_file
Produces a listing to stdout
of the sections in the object file in address order with their
addresses and sizes in hexadecimal. It also shows in decimal the
size of the image file that mkimage
would produce from this object file.
- mkimage object_input
image_output [section]
Translates an executable file into a memory image
containing an image of the program as it would appear when downloaded.
Sections are padded with zeros. No space is allowed for .bss.
By default, the file contains all sections of STYP_TEXT
and STYP_DATA
in the order of their starting addresses. You can override this
by specifying the section names.
- mkfill object_input
image_output fill_character
Translates an executable file into a memory image
containing an image of the program as it would appear when downloaded.
Sections are padded with the fill character specified. No space
is allowed for .bss. The file contains all sections of STYP_TEXT
and STYP_DATA
in order of their starting addresses.
- move object-file
[ mem_sect
{ phys_address | after section-name
} ]
Changes the physical address of mem_sect
in the object file header to phys_address
so that it can be used for a particular EPROM. If mem_sect
and phys_address
are not present, the .data section will be moved to immediately
follow the .text section. You can also specify the address in
the relative phrase after
section-name.
Note: This command alters the contents of the section headers
in the object file. It does not revise references to addresses
in the moved section.
- packhex hex_file
Compresses the hex file by repacking the data
records; the hex file will be converted in place.
- patch image_to_patch
file_holding_patch address
Writes the contents of the file holding the patch
into the image to patch at offset address.
- permute-a image_input
new_order image_output
Scrambles the ROM by specifying a permutation of the
address lines. new_order
is a series of 32 integers separated by spaces that specifies,
for each address bit from left to right, that bit's new position
in the output ROM image. Thus, a new order of 1 0 2 3 4 5 6 78
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2627 28 29 30
31 reverses the positions of each odd/even pair of bytes. This
command fails if the rom
or split
command does not precede it to describe the ROM space to be filled.
- permute-d image_input
new_order image_output
Permutes the bits in each ROM-width hunk of data in
a ROM image. new_order
is a series of integers separated by spaces that specifies for
each data bit from least to most significant position that bit's
new position in the ROM image. Thus, a new order of 7 6 5 4 3
2 1 0 reverses the order of the bits in an 8-bit-wide ROM image.
The ROM-width used by this command is the last ROM-width value
provided by a rom
or split
command.
- rom rom_length
rom_width [
rom_count ]
Specifies length and width of ROM images for subsequent
permute-a
and permute-d
commands; allows the split
command to issue warnings if its results will not fit the ROM
space described.
- sh command
Spawns a shell command. Upon completion of the command,
returns control to rom960.
- split image
memlen memwidth romlen romwidth outfile_nm
Splits a memory image of one length in bytes and width
in bits into ROM images, possibly of another length in bytes and
width in bits. The romlen
and romwidth
information given to this command can also be used in subsequent
permute-a
and permute-d
commands. outfile_nm
is used as a root name for the various images produced. Each output
file is of the form outfile_nm.xy,
where x
and y specify
the position of the ROM in the memory image. Thus, x
indicates the ROM's length-wise position in the image from 0 (lowest
part of address range) to (memlen
/ romlen),
and y indicates
the horizontal position in the image of the ROM, from 0 (first
romwidth
bits of memory-width-bits-wide data path) to (memlen
/ romwidth).
Return
to the top of this page.
Go
to the ic960 Interface Index.
Go
to the gcc960 Interface Index.