I just revised a program for a 18F452. Before I copied the hex file to the
production folder, I compared the size of the old and new hex files. The
old file was 91K, the new one (minor changes) is 12K. It appears the old
file has the entire memory space in the .hex file whereas the new file only
has the space actually used. What's the difference? Does it matter? Is
there a setting in MPLAB IDE 6.40 to change this? If so, I can't find it.
It appears the old
> file has the entire memory space in the .hex file whereas the new file
only
> has the space actually used. What's the difference? Does it matter? Is
> there a setting in MPLAB IDE 6.40 to change this? If so, I can't find it.
Well, I think I've answered my own question. The larger file was produced
using the "export" command.
It contains all of memory plus EEPROM & Config words.
Carey Fisher
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.748 / Virus Database: 500 - Release Date: 9/1/2004
> I just revised a program for a 18F452. Before I copied the hex file to the
> production folder, I compared the size of the old and new hex files. The
> old file was 91K, the new one (minor changes) is 12K.
It sounds like the old file was exported from MPLAB. Which means that
it might contain things that are not present in the code that built
it, such as configuration settings or EEPROM initializations.
Carey Fisher - NCS wrote:
> I just revised a program for a 18F452. Before I copied the hex file
> to the production folder, I compared the size of the old and new hex
> files. The old file was 91K, the new one (minor changes) is 12K. It
> appears the old file has the entire memory space in the .hex file
> whereas the new file only has the space actually used. What's the
> difference? Does it matter? Is there a setting in MPLAB IDE 6.40 to
> change this? If so, I can't find it.
I've only ever seen MPLINK write memory locations to the HEX file that were
actually specified in the source code.
What tool are you using to create the HEX file? What value was set for the
unused locations in the old HEX file? Are you using FILLMEM or similar?
> > files. The old file was 91K, the new one (minor changes) is 12K. It
> > appears the old file has the entire memory space in the .hex file
> > whereas the new file only has the space actually used. What's the
> > difference? Does it matter? Is there a setting in MPLAB IDE 6.40 to
> > change this? If so, I can't find it.
>
> I've only ever seen MPLINK write memory locations to the HEX
> file that were
> actually specified in the source code.
>
> What tool are you using to create the HEX file? What value
> was set for the
> unused locations in the old HEX file? Are you using FILLMEM
> or similar?
>
Olin,
You're right... either the linker or even MPASM with non-relocatable code
produce files
containing memory actually used. It turns out I use MPLAB IDE File/Export
to export memory to a file
that I can send to suppliers to program the PICs that go in my products. I
use export
so I can be sure the EEPROM and CONFIG data gets in the file. It probably
does anyway, but
it seems I have more control this way.
Carey Fisher