small utility to merge selected data from two hex files

All,

I wrote a small tool for my own use, which some of you may find useful also. It allows to merge selected address ranges from two Intel hex files into a new hex file (currently limited to 64KB hex files).

I use it to copy calibration information in flash (which is stored at a known location) from an existing hex file into a newly compiled hex file where the calibration information is still blank, using this command:

hexmerge firmware-nocal.hex 0:FFFF calibration.hex F000:FFE0 firmware.hex

Program and source can be downloaded from:

formatting link
(hexmerge utility).

greetings, Tom

Reply to
Tom Torfs
Loading thread data ...

Not wanting to rain on your parade, but why not just concatenate the two files?

Reply to
Everett M. Greene

Hi Tom,

You may also find this of interest.

formatting link

--
David T. Ashley              (dta@e3ft.com)
http://www.e3ft.com          (Consulting Home Page)
 Click to see the full signature
Reply to
David T. Ashley

On Aug 23, 10:24 pm, snipped-for-privacy@mojaveg.lsan.mdsg-pacwest.com (Everett M. Greene) wrote: [...]

To answer literally, because then you'd wind up with an EOF record in the middle of your file. But that's easy to fix.

Another problem is that the second file may overwrite values specified in the first. That sometimes causes problems with tools designed to read hex files. I'm thinking of a particular EPROM programmer I used in the past that would write the hex records to the EPROM in order. If the first file sets a location to 0x05, and the second tries to set it to 0x55, it's not pretty.

Regards,

Reply to
Dave Hansen

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.