
Chapter 9 – Firmware Upgrade Procedure
Intel Hex Format
An Intel Format Hex File is a text file consisting of “records”, one per line, that start with a “:” character and include only digits
Data records contain the actual data that is to be programmed into a device. The address contained in the data record needs to be combined with an extended address (by adding the extended address shifted four bits left to the data record address) to determine the actual programming address for the data. If no extended address record is before a given data record in the file, then the extended address value is assumed to be zero.
The record types are described below:
Data Record
Char Pos | Field Type | Value | Description |
|
|
|
|
1 | Record Start | “:” |
|
|
|
|
|
Data Byte Count “NN” |
| Maximum value is FF (which is 255 data bytes). | |
|
|
| Typical is 20h which causes the hex record to fit |
|
|
| in 80 columns. |
|
|
|
|
Address | “XXXX” | Lower 16 bits of 20 bit address, most significant | |
|
|
| byte first. This must be added to Extended |
|
|
| Address left shifted four bits. |
|
|
|
|
Record Type | “00” | Data Record | |
|
|
|
|
10+N | Data Bytes | “YY..YY” | The data bytes in hex. Each byte is two |
|
|
| characters. |
|
|
|
|
NN+1,2 | Checksum | “ZZ” | Zero minus the two’s complement addition of all |
|
|
| data hex values. |
|
|
|
|
NN+3,4 | End of Line | “\r\n” | Carriage Return followed by a Line Feed |
|
|
|
|
Example Data Record in Intel Format :2000A0005BB66DDBB66CD8B060C183060D1B366DDBB66DDBB76FDFBF7EFDFBF6EDDBB66DD4
Extended Address Record
| Char Pos | Field Type | Value |
| Description |
|
|
|
|
|
|
1 | Record Start | “:” |
|
| |
| Data Byte Count | “02” |
| Always 2 bytes for this record type | |
|
|
|
|
|
|
Address | “0000” |
| Not used for this record type (must be zero) | ||
|
|
|
|
|
|
Record Type | “02” |
| Extended Address Record | ||
|
|
|
|
|
|
Extended Address | “EEEE” |
| Top 16 bits of 20 bit address, most significant | ||
|
|
|
|
| byte first |
|
|
|
|
|
|
Checksum | “ZZ” |
| Zero minus the two’s complement addition of all | ||
|
|
|
|
| data hex values |
|
|
|
|
|
|
End of Line | “\r\n” |
| Carriage Return followed by a Line Feed | ||
| Example Extended Address Record in Intel Format |
| |||
| :020000021000EC |
|
|
| |
|
|
|
|
| |
End of File Record |
|
|
| ||
|
|
|
|
| |
| Char Pos | Field Type | Value |
| Description |
|
|
|
|
|
|
1 | Record Start | “:” |
|
|
SocketModem Global MT5634SMI Developer’s Guide | 74 |