Hello,
I'm using keil 3.4, optimization O3, cross module optimization.
I deleted all the objects files, listings... before compiling.
The first time I build the project, the code size is more than 11KB.
The second time ~7.7 KB.
The third time ~7.5
After that, it didn't change anymore.
No change was made between those builds. I just clicked the build button 3 times and it gave me 3 different code size.
I suppose it related to the using of cross-module optimization; but it's really strange.
Any clue?
Thanks,
We notice that symptom before and we resolve it by cleaning up all included files (global include versus local include).
Look in your dependencies tree in uVision (to enable it: uVision - View - Include File Dependencies). Browse in your project workspace and look for header file that are reported twice for the same c source file.
We use boot loaders and upgrade tools, so we need (and expect) to have the same hex file, no madder how many time you build your project.
Maybe it was not the same problem then you, I hope this help.
Francois.