Keil™, An ARM® Company

Discussion Forum

Every Time Diffrent MAP File generated in keil build

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Author
Saurabh Pandya
Posted
2-Oct-2008 04:36
Toolset
ARM
New! Every Time Diffrent MAP File generated in keil build

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

Author
Tamir Michael
Posted
2-Oct-2008 04:41
Toolset
ARM
New! RE: Every Time Diffrent MAP File generated in keil build

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.

Author
Mike Kleshov
Posted
2-Oct-2008 04:42
Toolset
ARM
New! RE: Every Time Diffrent MAP File generated in keil build

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.

Author
Viktor Bucher
Posted
3-Oct-2008 02:33
Toolset
ARM
New! RE: Every Time Diffrent MAP File generated in keil build

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%.

Author
Saurabh Pandya
Posted
13-Oct-2008 02:21
Toolset
ARM
New! RE: Every Time Diffrent MAP File generated in keil build

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..

Author
Tamir Michael
Posted
13-Oct-2008 02:43
Toolset
ARM
New! RE: Every Time Diffrent MAP File generated in keil build

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?

Next Thread | Thread List | Previous Thread Start a Thread | Settings