Menu

#16 hex2bin 2.x creates a very large bin file from a smaller hex

v1.0.12
closed
nobody
None
5
2015-12-01
2015-10-20
McGerbick
No

I have a hex file of about 88 kBytes (see attachment) that hex2bin 2.0 as well as 2.1 erroneously converts to a binary of 256 MBytes. hex2bin 1.0.12, however, does it correclty.

Further hex files of my project are converted correclty by hex2bin 2.x.

1 Attachments

Discussion

  • Jacques Pelletier

    It seems the large size is normal, since there is an extended linear address record at line 2006 of your hex file. It has the upper word defined as 1000, so the records following this extended address are supposed to be located at 10000000. See the provided docs for the Intel hex format.

    I tried srecord on your example and it gave almost the same result. But the file produced by Hex2bin 2.1 is wrong, compared to srecord, so there's definitely a bug with the processing of extended records.

    Same thing for hex2bin 1.0.12: there is a bug with extended addressing.

    Please check if your compiler includes data that is supposed to go in RAM. The code in your file goes from 5000 to CD4F and 10000000 to 10000077. With hex2bin 1.0.12, the code in the higher section is placed in 0000 to 0077.

     

    Last edit: Jacques Pelletier 2015-10-23
  • Jacques Pelletier

    • status: open --> closed
     
MongoDB Logo MongoDB