2015年7月31日 星期五

Intel HEX - F/W burn code

https://en.wikipedia.org/wiki/Intel_HEX

example:
:1000830002243BE5C754F84401F5C7790122000077


  1. Start code, one character, an ASCII colon ':'.
  2. Byte count, two hex digits
  3. Address, four hex digits
  4. Record type (see record types below), two hex digits, 00 to 05 
  5. Data
  6. Checksum, two hex digits

Hex codeRecord typeDescriptionExample
00DataContains data and a 16-bit starting address for the data. The byte count specifies number of data bytes in the record. The example shown to the right has 0B (decimal 11) data bytes (6164647265737320676170) located at consecutive addresses beginning at address 0010.:0B0010006164647265737320676170A7
01End Of FileMust occur exactly once per file in the last line of the file. The data field is empty (thus byte count is 00) and the address field is typically 0000.:00000001FF
02Extended Segment AddressThe data field contains a 16-bit segment base address (thus byte count is 02) compatible with 80x86 real mode addressing. The address field (typically 0000) is ignored. The segment address from the most recent 02 record is multiplied by 16 and added to each subsequent data record address to form the physical starting address for the data. This allows addressing up to one megabyte of address space.:020000021200EA
03Start Segment AddressFor 80x86 processors, specifies the initial content of the CS:IP registers. The address field is 0000, the byte count is 04, the first two bytes are the CS value, the latter two are the IP value.:0400000300003800C1
04Extended Linear AddressAllows for 32 bit addressing (up to 4GiB). The address field is ignored (typically 0000) and the byte count is always02. The two encoded, big endian data bytes specify the upper 16 bits of the 32 bit absolute address for all subsequent type 00 records; these upper address bits apply until the next 04 record. If no type 04 record precedes a 00 record, the upper 16 address bits default to 0000. The absolute address for a type 00 record is formed by combining the upper 16 address bits of the most recent 04 record with the low 16 address bits of the 00 record.:02000004FFFFFC
05Start Linear AddressThe address field is 0000 (not used) and the byte count is 04. The four data bytes represent the 32-bit value loaded into the EIP register of the 80386 and higher CPU.:04000005000000CD2A

沒有留言:

張貼留言