1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

small utility to merge selected data from two hex files

Discussion in 'Embedded' started by Tom Torfs, Aug 23, 2007.

  1. Tom Torfs

    Tom Torfs Guest


    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

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

    Program and source can be downloaded from: http://cprog.tomsweb.net/embedded.html
    (hexmerge utility).

    Tom Torfs, Aug 23, 2007
    1. Advertisements

  2. Not wanting to rain on your parade, but why not just concatenate the two
    Everett M. Greene, Aug 24, 2007
    1. Advertisements

  3. Hi Tom,

    You may also find this of interest.

    David T. Ashley, Aug 24, 2007
  4. Tom Torfs

    Dave Hansen Guest

    On Aug 23, 10:24 pm, -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.

    Dave Hansen, Aug 24, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.