Hex File Payload Tool by Maximus 1.0
So, we all saw (i hope) the Maximus ANYHEX converter for PIC users previously here, and as promised, a dedicated converter tool has been released.
What this tool is, is an application that allows us to take a payload from theorectically any board out there (have only been tested on a teensy 2.0++ and PIC18F myself), and convert it into a working file for another board.
What does it require/create?
a) Donor File. Aka, the .hex file that has the payload you want.
b) Acceptor File. Aka, the .hex file that has an image of working code for your board. Aka, LED settings, clock frequencies, etc.
c) Destination File. Aka, The resulting output file (this tool does not overwrite the Acceptor file). This file consists of the working code from your Acceptor file, combined with the payload from the Donor file.
As stated by the original author:
For instructions on how to make your own acceptor file that is compatible with both hermes and pl3 payloards, please read this post or this post
WHAT PROCESSORS .HEX CAN ACCEPT AS INPUT AND OUTPUT?
It take any .hex (intel hex) file, its not restricted to any processor, but I
only have tested from ATMEL to PIC and from PIC to ATMEL, I dont have arduinos silabs, etc so it might work. The output file is intel hex file ready to
flash with the tool of your choice.
So is this a final solution for the nightmare of payload porting ?
Well I wish but no, its more than that, this tool only replace some payload
components between files, a trivial task. The problem might come if the
acceptor file is not ready for payload replacement, by example you will have
issues if you transplant between Kakaroto pl3 based payloads and Hermes based payloads, so the acceptor file MUST check what payload type has and take actions accordingly. If you want to keep on the safe side of the street dont crossover between PL3 based and Hermes based unless you modify the acceptor file to be ready for both.
So why is there an application like this? As mentioned on the Maximus AVR USB Blog it is very tiring to constantly compile payloads. This will take the burden off not only the compilers, but the people looking for payloads. All around, this is just a really great app to have, just in case!
This program can also be invoked by other software. Hopefully we will see some nice programmers out there implement this into their flashing software:
Here below you can see a screenshot of a 16mhz UDIP hex file being used as the Donor (Source) file, and a Generic (Destination) file I have compiled specifically for this program for PIC18F using the MCHPUSB (PICDEM) bootloader. In the picture below you can specifically see that in the destination file I made, it contains no payload data (so its easy to spot that the file is loaded in the right section). This may not be true with your destination file.
hextool.exe /batch donorfile.hex acceptorfile.hex destination.hex
And below, you can see what the program says if you load a file either as the source or destination that does not contain the proper payload data.
When you have both hexes loaded, and it does not error out on you like above you can then select your output file. Afterwards, click Generate File.
Congrats! You have just successfully extracted the payload from one boards hex file, and injected it and saved it into a new file for your board.
Below, you will find the program itself, Hextool 1.0.
Also, I am not the author of this tool, nor am i affiliated with Maximus in any way. Feel free to report bugs here however as i'm sure they won't go unnoticed.
This application is a Windows based application and requires .net 4.0 or above.
PIC users who currently use hexes from me who are happy with their LED support, please feel free to visit my thread for some generic hexes compatible with this tool.
Compatibility: Currently, I have personally tested this app to work by taking a pic18f donor file (hermesv4b+3.50 spoof) and used the hermesv1 hex for my teensy2.0++ acceptor file. I have also tested taking a UDIP pl3 and hermesv4b hex file and a pic18f generic acceptor file i made (not specific to pl3 or hermes). As long as your acceptor file is setup to work with both payloads, you shouldnt have any issue switching between hermes/pl3. I hope soon we will see more and more acceptor files being made.