We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Dear All,
I am using keil sdk v3.22.
What behavior I noticed is, when i use "rebuild all" or "build" option ,
Map file is generated.
Next time, Even if I am not changing Any line of code,
I am rebuilding target second time(using "rebuild all" or "build" option), the map file that is being generated is bit diff,
If you put both the map files under WINDIFF software you can see the differences. Major visible diff is in code size and
Data size variation of these version of map file of the single code. My concern is just with reliability. Is it normal behavior or some thing not happen correct to my sdk.
Also, one more thing I have noticed that is if one make use of "clean target" option before "rebuild all" , then the generation of MAP file is even.
What might be the conclusion and right way to use your compiler ?
Can you pls guide...
-Saurabh
This is no surprise. the compiler can generate more efficient code if you compile again with the presence of the --feedback flag (assuming you use the RealView compiler). See your compiler manual - look for the
--feedback
option.
The RealView compilation tools have an unusual mechanism for eliminating unused functions:
http://www.keil.com/support/man/docs/armcc/armcc_chdcfebg.htm
So after 'clean target' the first and the second build passes will most likely differ, because after the first pass some(all?) unused functions will not be eliminated. The third pass should not change the memory map, though.
I notice that too. In one particular application the first time I build I got xxxxx bytes of code, The second time yyyyy bytes of code. If I build a third time I get again xxxxx bytes and so on. Only the largest build work OK 100%.
Thanks all,
I also noticed that largest build works 100%, rest not relible due to some memory optimization techniques or some thing else. But I tried the option
- > clean target - > rebuild all (with optimization level=1) works fine all time..
If the compiler is correctly implemented, the optimization level must not be allowed to influence the behavior of you program (let be charitable and say: the "output"). I think that there is something in your program that makes certain assumptions that become invalid due to optimization. Are you getting any warnings during your build? Do you use inline assembly?