User manual

Utilities
2012 Microchip Technology Inc. DS52053B-page 303
8.6 HEXMATE
The HEXMATE utility is a program designed to manipulate Intel HEX files. HEXMATE is
a post-link stage utility which is automatically invoked by the compiler driver, and that
provides the facility to:
Calculate and store variable-length checksum values
Fill unused memory locations with known data sequences
Merge multiple Intel HEX files into one output file
Convert INHX32 files to other INHX formats (e.g., INHX8M)
Detect specific or partial opcode sequences within a HEX file
Find/replace specific or partial opcode sequences
Provide a map of addresses used in a HEX file
Change or fix the length of data records in a HEX file.
Validate checksums within Intel HEX files.
Typical applications for HEXMATE might include:
Merging a bootloader or debug module into a main application at build time
Calculating a checksum over a range of program memory and storing its value in
program memory or EEPROM
Filling unused memory locations with an instruction to send the PC to a known
location if it gets lost.
Storage of a serial number at a fixed address.
Storage of a string (e.g., time stamp) at a fixed address.
Store initial values at a particular memory address (e.g., initialize EEPROM)
Detecting usage of a buggy/restricted instruction
Adjusting HEX file to meet requirements of particular bootloaders