User manual

MPLAB
®
PM3 User’s Guide
DS51464C-page 74 © 2006 Microchip Technology Inc.
7.7 FILES USED BY MPLAB PM3
MPLAB PM3 can use information directly from MPLAB IDE projects without any
intermediate steps. MPASM assembler can be used separately from MPLAB IDE to
produce hex files for MPLAB PM3. Alternatively, devices can be programmed with hex
files from any PICmicro MCU-compatible cross-assembler or cross-compiler.
If using MPASM assembler separate from MPLAB IDE, or generating hex files from
within MPLAB IDE for use later with MPLAB PM3, use either INHX8M or INHX32 hex
formats. MPASM assembler’s default output format for hex files is INHX32.
If programming PIC17CXXX, PIC18CXXX or PIC18FXXX devices, use INHX32 format.
See the “MPASM™ Assembler, MPLINK™ Object Linker, MPLIB™ Object Librarian
User’s Guide” (DS33014) for details on file formats.
7.7.1 Using Hexadecimal Record Formats
The following provides the proper file format for the PICmicro MCU device families.
Make sure the assembler or compiler is configured to generate hex files in the proper
format. MPLAB PM3 uses the formats described in Table 7-11.
Each hexadecimal data record has the following format:
:BBAAAATTHHHH....HHCC
INHX8M
The data record is output as described above.
INHX32
The extended linear address record is output to establish upper 16 bits of data address.
TABLE 7-11: PICmicro
®
MCU DEVICE FAMILY FILE FORMATS
Device Family File Format
PIC16C5X/6X Uses INHX8M
PIC17CXX Uses INHX32
PIC18XXX Uses INHX32
Firmware Downloads Uses INHX32
TABLE 7-12: HEX DATA RECORD FORMAT
Record Format Description
: Start character (prefix)
BB 2-digit byte count specifying the number of data
blocks in a record
AAAA 4-digit starting address of the data record
TT 2-digit record type:
00 = Data record
01 = End of file record
02 = Segment address record
04 = Extended linear address record
(INHX32)
HHHH....HH 2-Digit data blocks
CC 2-Digit checksum. Two's complement of the sum of
all preceding bytes in the data record except the
colon (start character).