SLAU131V October 2004 – February 2020
When the hex conversion utility translates your object file into a data format, it partitions the data into one or more output files. When multiple files are formed by splitting memory words into ROM words, filenames are always assigned in order from least to most significant, where bits in the memory words are numbered from right to left. This is true, regardless of target or endian ordering.
The hex conversion utility follows this sequence when assigning output filenames:
For example, assume that the target data is 16-bit words being converted to two files, each eight bits wide. To name the output files using the ROMS directive, you could specify:
ROMS
{
RANGE1: romwidth=8, files={ xyz.b0 xyz.b1 }
}
The utility creates the output files by writing the least significant bits to xyz.b0 and the most significant bits to xyz.b1.
--outfile=xyz.b0 --outfile=xyz.b1
If both the ROMS directive and --outfile options are used together, the ROMS directive overrides the --outfile options.
a | for ASCII-Hex | |
i | for Intel | |
m | for Motorola-S | |
t | for TI-Tagged | |
x | for Tektronix |
For example, assume a.out is for a 16-bit target processor and you are creating Intel format output. With no output filenames specified, the utility produces two output files named a.i0, a.i1, a.i2, a.i3.
If you include the following ROMS directive when you invoke the hex conversion utility, you would have four output files:
ROMS
{
range1: o = 0x1000 l = 0x1000
range2: o = 0x2000 l = 0x1000
}
These output files ... | Contain data in these locations ... |
---|---|
a.i00 and a.i01 | 0x1000 through 0x1FFF |
a.i10 and a.i11 | 0x2000 through 0x2FFF |