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.
"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?
why would a professional "board house" be using such a thing?
They wouldn't thus the board house is not 'professional'.
Erik