Our board house asked us if we could supply them with a hex file which is in consecutive order. Currently the addresses in the hex file are jumbled up. What I mean is there a way to tell the linker to generate a hex file in linear order, from address 0 to max. I was looking all over but was not able to find any information. I did try to use bin2hex to generate a hex file from a binary, but the generated hexfile did not work at all.
Use the software for a flash programmer (more than one are possible to download and run even without owning the programmer). Fill memory with 0xff, load the non-sorted, non-contiguous hex file. Dump memory to new hex file.
I think this program has a feature that will realign the hex file in order. I've never actually used it though, just stumbled across it a few weeks ago.
srecord.sourceforge.net/
"Our board house asked us if we could supply them with a hex file which is in consecutive order."
Sounds suspicious to me - have you asked them why they need that?
The Intel Hex specification makes no requirement that addresses must be in order - and it never has done.
A failure to cope when the addresses are not in order is a common failure of poor software with a cheap programmer - why would a professional "board house" be using such a thing?
http://www.keil.com/support/docs/1236.htm
Jon
why would a professional "board house" be using such a thing?
They wouldn't thus the board house is not 'professional'.
Erik