What is the format of the .hex files used to load the flash ROM?
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:
:020000040007F3 :1000000096D2000480030A160000000000000000E1 :1000100000310000000015B500184E001A50001CF9 [snip] :1096C0000E190EC3BF3A0F190EC3A90FB8001AB175 :1096D000010165022D023300000001010003120F99 :0696E000B000E2EB0F6F89 :00000001FFEach 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 = ChecksumAll 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.
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 recordTINI 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).