8.2.3.17 Format Hexmate Option
The
-format=type[,length]
option
specifies the format of the Intel HEX file to output and optionally the maximum record data
length in the output file.
A simple use-case of this option is to change the format of a HEX file; for example, from an INHX16 to an INHX32 format. It can also be used to specify the output file type after merging input HEX files (possibly with different formats) and/or inserting or adjusting values into the data.
The type
argument specifies a named INHX
format to generate, such as INHX16
, as tabulated below. These formats are
discussed in 8.2.2.1 HEX File Formats. Note
that the address range of data to be output might dictate which formats can be used.
The length
argument is optional and sets the maximum
number of bytes per data record. A valid length for this option is between 1 and 255
decimal, inclusive, with 16 being the default if a length is not specified with the
option.
The possible formats that are supported by this option are listed below.
Note that the INHX032
selection is not an actual named INHX format.
Specifying this format generates an INHX32 format file, but it will also initialize the
upper base address to zero using an Extended Linear Address (type 4) record. This
initialization is a requirement of some device programmers.
Type | Valid record types | Comments |
---|---|---|
INHX8M |
0, 1 | 16-bit wide HEX file address field |
INHX16 |
0, 1, 2, 3 | 20-bit wide HEX file address field |
INHX32 |
0, 1, 4, 5 | 32-bit wide HEX file address field |
INHX032 |
0, 1, 4, 5 | INHX32 with initialization of Extended Linear Address to zero |