Hexmate.exe is a command line program for Windows that Microchip
publishes with it's Hi-Tech tool suite. (Microchip acquired
hexmate.exe was part of the Hi-Tech tools for a long time.) It
best tool for combining hex files that I have found. It is very
use and does a very good job. Oh, and it comes for free as part
of Microchip's MPLAB X install. You can find it at
(x86)\Microchip\MPLABX\mplab_ide\bin\hexmate.exe (on Windows 64,
adjust first part of path based on your OS). If you just want to
download hexmate itself, please see the link below.
The UBW, UBW32 and EBB boards all use a USB based bootloader.
allows users to update or change the firmware on the boards
using a hardware programmer. Instead, the new firmware is
over the USB from an application on the PC and then burned into
on the board. This works very well and is
very easy to use, but it means that there are two separate
that need to be loaded onto the board's Flash - first the
and then the
actual firmware application.
These two programs are developed separately and built as
files. Once the two HEX files have been created, there are two
get these HEX files onto a board:
- Use a hardware programmer like the PICKit2 or PICKit3 to
USB bootloader HEX file onto the board. Then boot the board
and use the
bootloader to download and program the firmware HEX file.
- Combine the two HEX files into a single HEX file and
combined file onto the board using a hardware programmer
PICKit2, RealIce, ICD3 or PICKit3.
For speed's sake, the second method is used for production. Thus
is a need to combine HEX files into one. Hexmate.exe is the
for that job, this page explains how to use it.
Microchip has been kind enough to grant us permission to
Hexmate.exe from this website. So you can pick up a copy right
without downloading a larger package from Microchip
- Hexmate.exe (zipped,
1.42595) - For Windows. It's just a command line tool, so I
that it runs on all Windows versions from 2000 on up.
- Note that hexmate has a separate file (en_msgs.txt) that
contains its error messages. It normally needs to see this
file in a relative path of ..\dat\en_msgs.txt from itself.
The zip file I have linked to above contains the proper
folder structure for hexmate to find its error text file,
so expand the folder onto your hard drive, then navigate
into the hexmate_1_42595\bin folder and run hexmate from
there. You can also add a command line option to tell
hexmate where to find its error text file.
You can do some very complicated things with hexmate, but the
common thing to do is to combine two hex files into one. Let's
have a bootloader file called boot.hex
and a firmware file called firmware.hex
You want an output file called combined.hex
So put both files in the same directory, put hexmate.exe there
(or put it in your path), then open a command window and
the directory. Then type:
hexmate boot.hex firmware.hex -Ocombined.hex
If there are any sections of the two hex files that overlap,
will complain and not output a file. You can either choose to
problem by re-building the offending hex file, or you can ask
to use the second file's data as the 'winner' of the conflict by
hexmate boot.hex +firmware.hex -Ocombined.hex
There are a lot of other options for hexmate.exe. For a complete
and for complete documentation, see section 6.6 of the HI-TECH
compiler manual (called manual.pdf, installed by default to
Files\HI-TECH Software\PICC\9.70\docs\manual.pdf). Or run
hexmate.exe --help from the command line.