New hex file parser/dumper now available for free download!
I've been having so much trouble getting what should be dead-simple code to burn in my designs, that I've almost gone mad trying to decipher the hex output format and see if the config fuses are set properly, data load addresses, and so on.
So I've built a standalone hex file parser that runs under native windows that will :
1. Parse every line in the hex file and display it in normal "dump" format, with ASCII representation of the data, and
2. Shows every line's absolute load address so that config register addresses are correctly displayed and decoded.
It also allows a simple "refresh" parse so you can repeatedly check the compiler's changes without having to reload the hex file.
It also does some other stuff as well, like :
- Checks each line to ensure the hex file is intact
- Confirm each line's checksum with a separately generated checksum
- Save the descriptive text output to any output file.
It will also attempt to highlight any problems if there are problems like spaces, extra characters, and bad checksums. It will even parse a hex file embedded in a text file, but of course that's about as useful as a chocolate teapot.
It may be a bit too simple for some folks, and I apologise for not doing a device-dependent parse, but as it stands, the tool will decode ANY hex file for ANY device, not just PIC family devices (I do a lot of Z80 development with an eZ80 system, so it's nicer for me to be able to use it for all my hex files!)
It's free for non-commercial use, and you're welcome to download it from the website. The URL is http://www.audiography.com.au/Software/HexLister.zip
The current release is ver 1.13, build 69, but this will probably change fairly quickly.
You don't need to install anything to run it, it will work fine straight out of the zip file! It does keep track of all the hex files examined using a simple text file in the exe's folder, but that's it. That feature means it's a piece of cake to reload and reparse files in very different folders!
For an example, here's a typical hex file compiled for the PIC18F4620:
And the same data, formatted by the tool, looks like :
Opened tinybld18F4620_SC.HEX (in C:\Program Files (x86)\TinyBoot\picsource\18f\) OK.
Initial hex file check passed.
Parsing button is now ENABLED. Have fun!
### Parsing started...
File C:\Program Files (x86)\TinyBoot\picsource\18f\tinybld18F4620_SC.HEX parsed OK!
====================================== Formatted file contents ==============================
Line 1 : [XLin] New high address offset : $0000 (New base start address : $00000000)
Line 2 : [Data] Address : $00000000 Data : A0,EF,7F,F0 :
Line 3 : [Data] Address : $0000FF38 Data : 00,00,00,00,00,00,00,00 :
Line 4 : [Data] Address : $0000FF40 Data : 24,0E,AC,6E,40,0E,AF,6E,90,0E,AB,6E,46,D8,C1,08 : $ n@ n nF
Line 5 : [Data] Address : $0000FF50 Data : 53,E1,4F,0E,AD,6E,4B,0E,AD,6E,00,6A,3E,D8,F8,6E : S O nK n j> n
Line 6 : [Data] Address : $0000FF60 Data : 07,6E,3B,D8,F7,6E,A9,6E,38,D8,F6,6E,A8,6E,35,D8 : n; n n8 n n5
Line 7 : [Data] Address : $0000FF70 Data : 01,6E,01,2A,00,EE,09,F0,F5,6E,2F,D8,EC,6E,01,2E : n * n/ n .
Line 8 : [Data] Address : $0000FF80 Data : FB,D7,00,66,1F,D0,07,AC,03,D0,04,0E,1E,D8,18,D0 : f
Line 9 : [Data] Address : $0000FF90 Data : 07,AE,04,D0,0C,00,C4,0E,18,D8,12,D0,94,0E,15,D8 :
Line 10 : [Data] Address : $0000FFA0 Data : 0A,00,08,0E,05,6E,00,EE,0A,F0,08,0E,06,6E,EE,50 : n n P
Line 11 : [Data] Address : $0000FFB0 Data : F5,6E,0F,00,06,2E,FB,D7,84,0E,07,D8,05,2E,F5,D7 : n . .
Line 12 : [Data] Address : $0000FFC0 Data : A6,94,C9,D7,4E,0E,AD,6E,C8,D7,A6,6E,55,0E,A7,6E : N n nU n
Line 13 : [Data] Address : $0000FFD0 Data : AA,0E,A7,6E,A6,82,00,00,12,00,0B,0E,02,6E,03,6A : n n j
Line 14 : [Data] Address : $0000FFE0 Data : 04,6A,9E,AA,03,D0,AE,50,00,26,12,00,04,2E,F9,D7 : j P & .
Line 15 : [Data] Address : $0000FFF0 Data : 03,2E,F6,D7,02,2E,F3,D7,AB,9E,9E,D7 : . .
Line 16 : [XLin] New high address offset : $0030 (New base start address : $00300000)
Line 17 : [Data] Address : $00300001 Data : 02,03,14 :
Line 18 : [Data] Address : $00300005 Data : 85,C5 :
Line 19 : [Data] Address : $00300008 Data : 0F,C0,0F,E0,0F,40 : @
Line 20 : [EndF] *** EOF Record ***
==================================== END formatted file contents ============================
I know which one I'd rather read through to find problems or bugs!
Questions, suggestions, and comments are always welcome. Because the code is still a work in progress, the version number will likely change if anyone finds any more bugs, but the URL will stay the same.
I hope this tool goes some way to help repay a small part of my karmic burden to all the forum members who have helped me in the past!
post edited by PCPete - 2009/03/31 17:13:06