7.2.3.1 Specifications and Filenames

Hexmate can process Intel HEX files that conform to a variety of formats, as discussed in 7.2.2.1 HEX File Formats. Hex files typically use a .hex extension; however this is not mandatory when using Hexmate.

Additional specifications can be applied to each HEX file listed on the command line to place conditions on how this file should be processed. If any specifications are used, they must precede the name of the file they correspond to, using a comma to separate them from the filename.

A range restriction can be applied with the specification rStart-End, where Start and End are both assumed to be hexadecimal addresses, whose interpretation is based on the addressing value (see 7.2.3.10 Addressing Hexmate Option). Hexmate will only process data within the address range restriction. For example, assuming that the addressing value is 1, the specification:
r100-1FF,myfile.hex
will tell Hexmate to use myfile.hex as an input file but that it should only process data from that file that has HEX file addresses within the range 0x100-1FF (inclusive).
An address shift can be applied with the specification sOffset, where Offset is assumed to be an unqualified hexadecimal value. If an address shift is used, data read from this HEX file will be shifted (by the offset specified) to a new HEX file address in the output file. The offset can be either positive or negative. For example, the specification:
r100-1FFs2000,myfile.hex
will shift the block of data from 0x100-1FF in myfile.hex to the new HEX file address range 0x2100-21FF in the output.

Be careful when shifting data containing executable code. Program code should only be shifted if it is position independent.