fAt 01:49 PM 3/27/2004 +0100, you wrote: >Hi. >Does anyone know of a tool to compare two HEX files ? > >The problem with using "normal" file compare tools, is that >two HEX files could look different, but they could still be >functional the same. The reason is of course that different >things (memory sections) in the HEX file don't have to come >in any special or fixed order. As when using one HEX file to >flash a part, and then reading back the contents to a new >file. > >I need a tool tool that knows how to read and interpret >the HEX data from two files and report any differences. Years ago I wrote a utility to do this when porting a whole bunch of programs for working products from one assembler to another. I had already found discrepancies and wanted to be sure that there were no other ones. Unfortunately I don't have the software any more, but if someone wants to write it, it should only take a few hours if you're up to speed. You can get the official Intel hex format document from my website (in sig). Parsing Intel hex is easy, so just read it in, note any checksum errors if you like, and put it into arrays. Compare the arrays, spit out the differences. The only other consideration is what to do with "unspecified" words, as Intel hex allows you to leave "holes" in the data. Typical choices might be all 0's or all 1's. You could also keep track of just what bytes were specified in both cases, and compare, which might be ideal, or might show up differences where there were no important ones. Best regards, Spehro Pefhany --"it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads