2024年5月9日发(作者:)
6/7/00
DATA-FILE CONVERSION TO INTEL HEX-32 FORMAT
Zapcode only accepts customer data files in INTEL HEX-32 format. Therefore, before submitting
your data file to Intel you must ensure it is properly formatted in INTEL HEX-32 format. This
document provides instructions on how to verify that your data file is in INTEL HEX-32 format, or,
if necessary, how to use a device programmer to convert a data file to INTEL HEX-32 format.
1.0 INTEL HEX-32 FILE FORMAT DESCRIPTION
The following provides a detailed description of INTEL HEX-32 format. Please ensure the data file
you submit to Intel using Zapcode conforms to this format:
Intel Hex-32 Specification
1.1 Introduction
The Intel 32-bit Hexadecimal Object file record format has a 9-character, 4 field, prefix that
defines the start of record, byte count, load address and record type. The record format also has
a 2-character suffix containing a checksum.
1.2 Record Types
The Intel 32-bit Hexadecimal Object file record format contains
six record types:
00 Data Record
01 End Record
02 Extended Segment Address Record
03 Start Segment Address Record
04 Extended Linear Address Record
05 Start Linear Address Record
1.3 Data Record
Record type 00, the data record, is the record that contains the data of the file. The data record
begins with the colon start character (":") followed by the byte count, the address of the first byte
and the record type ("00"). Following the record type are the data bytes. The checksum follows
the data bytes and is the 2's compliment of the preceding bytes in the record, excluding the start
character. The following are examples of data records (spaces are included for clarity only and
should not be found in a real object file).
:10 0000 00
FFFEFDFCFBFAF9F8F7F6F5F4F3F2F1F0 FF
:05 0010 00 AA
1.4 End Record
Record type 01, the end record, signals the end of the data file. The end record starts with the
colon start character (":") followed by the byte count ("00"), the address ("0000"), the record type
("01") and the checksum ("FF").
:00 0000 01 FF
1.5 Extended Segment Address Record
Record type 02, the extended segment address record, defines bits 4 through 19 of the segment
base address. It can appear anywhere within the object file and it affects the absolute memory
address of all subsequent data records in the file until it is changed. The extended segment
address record starts with the colon start character (":") followed by the byte count ("02"), the
address ("0000"), the record type ("02"), the 4 character ASCII representation of the hexadecimal
number represented by bits 4 through 19 of the segment base address and the 2 character
checksum.
:02 0000 02 1000 55
1.6 Start Segment Address Record
Record type 03, the start segment address record, defines bits 4 through 19 of the execution start
segment base address for the object file. This record is currently ignored.
:02 0000 03 0000 55
1.7 Extended Linear Address Record
Record type 04, the extended linear address record, defines bits 16 through 31 of the destination
address. It can appear anywhere in within the object file and it affects the absolute memory
address of all subsequent data records in the file until it is changed. The extended linear address
record starts with the colon start character (":") followed by the byte count ("02"), the address
("0000"), the record type ("04"),the 4 character ASCII representation of the hexadecimal number
represented by bits 16 through 31 of the destination address and the 2 character checksum.
:02 0000 04 FFFF 55
1.8 Start Linear Address Record
Record type 05, the start linear address record, defines bits 16 through 31 of the execution start
address for the object file. This record is currently ignored.
:02 0000 05 0000 55
1.9 Example
The following is an example of an Intel Hexadecimal Object file record. It contains the following
records: extended linear address, extended segment address, data and end.
:EA
:FFBD
:FFAA5502
:00000001FF
1. Determine the extended linear address offset for the
data record (0108 in this example).
:02 0000 04 0108 EA
2. Determine the extended segment address for the data
record (12FF in this example).
:02 0000 02 12FF BD
3. Determine the address offset for the data in the
data record (0100 in this example).
:04 0100 00 90FFAA55 02
4. Calculate the absolute address for the first byte of
the data record.
+ 0108 0000 linear address offset
shifted left 16 bits
+ 0001 2FF0 segment address offset
shifted left 4 bits
+ 0000 0100 address offset from
data record
= 0109 30F0 32 bit address for
first data byte
5. Which gives us the following
010930F0 90
010930F1 FF
010930F2 AA
010930F3 55
1.10 Notes
* Checksum values are ignored.
* Each data record must contain an End Of Line delimiter
stnd
* If data is presented in Word format then 1 byte is mapped to the LSB, 2 byte to MSB.
* All values are hexadecimal
* Record types 03 and 05 are ignored
* Lines not starting with a colon (":") raise an exception
* Unknown record types are ignored
2.0 USE A DEVICE PROGRAMMER TO CONVERT DATA FILES TO INTEL HEX-32
FORMAT
In the event that your data file is not formatted in INTEL HEX-32 format you can use a device
programmer to convert from any format to INTEL HEX-32 format. This document provides
instructions for converting data files using a BP Microsystems programmer. If you do not own a
BP Microsystems programmer you may use any device programmer to perform this function. If
necessary, read the device programmer instruction manual to understand how to perform the
data file conversion operation.
Data File Conversion Using a BP Microsystems Programmer
Begin by loading your non-INTEL HEX-32 formatted data file to the programmer buffer memory.
To do this go to the Buffer Load menu.
1. From the buffer load menu specify the directory pathname/filename where the non-INTEL
HEX-32 formatted file resides.
2. Specify the file format of the existing file in the Type: parameter.
3. Hit the return key to execute this command.
To convert the file you just loaded in the buffer memory to INTEL HEX-32 format and save to a
file:
4. Go to the Buffer Save menu.
5. Specify the directory pathname/filename where you want to write the converted file.
6. In the Type: parameter specify INTEL file format.
7. Hit the return key to execute this command.
发布评论