What is the format of the .hex files used to load the flash ROM?

Tim Rohaly

The .hex files containing the TINI firmware and APIs are stored in the Intel Hexadecimal Object File Format, which is documented at ftp://download.intel.com/support/processors/i960/devtools/intelhex.pdf.

Briefly, this is an ASCII format containing only the characters 0-9, A-F, and ':'. A hex file looks something like the following:

Each line defines a data record ordered as:
: = Start of data record
n = Number of actual data bytes in record (see d field, below)
a = Load address of data record
t = Record type (see below)
d = Actual data bytes in record
c = Checksum
All fields are fixed-length except for the actual data, which may be between 0 and 255 bytes long. Note that all values are encoded as hexadecimal numbers.

Valid Hex File record types are:
0x00 = Data record
0x01 = End of File record
0x02 = Extended Segment Address record
0x03 = Start Segment Address record
0x04 = Extended Linear Address record
0x05 = Start Linear Address record
TINI uses the Extended Linear Address record to select the flash ROM bank to be loaded, and the load address field to specify the offset from the beginning of the bank. In the above example, the .hex file specifies that the code should be loaded into the start of bank 7 (:020000040007F3).

The checksum is computed as the two's complement of the eight bit sum of all the preceding characters on the line except the ':'.

The End of File data record must specify a record length of 0x00, and should always be the same as the above example (:00000001FF).

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.