Hi,
I am using a Samsung chip with cortex-M3 core,when i Build the code using 4.22a version of keil the code size is aroung 498KB at optimization level 1.The same code when i build using 4.23 version with same optimization level is coming around 473Kb.Does anyone can help me telling why this difference is happening.
Thanks in advance,
Regards, Ramanarayanan
using 4.22a, size ~498KB; using 4.23, size ~473Kb.
So the newer compiler gives slightly smaller code; ie, the optimisation (or whatever) is slightly improved - is that not exactly what you'd hope for in a newer version??!
Different uvision versions are likely to have different compiler versions (or possibly have changes to default flags).
Different compiler versions, or compiler when used with different set of flags, are likely to produce different code.
That is a reason why (if it's important) people often have to have multiple versions installed at the same time - if a program have been ceritified using one compiler/set of flags, it'll have to continue with that compiler/set of flags just to make sure a change in code generation doesn't introduce a change in program behaviour.
My problem was because the compiler version is same only Keil version was differend,so as per my understanding same compiler version should give same code at same optimization level.May be as Mr.Per Westermark said the default flag would have been changed,Anyways thanks for the reply.
The compiler version are same,may be the default setting would have been changed,i ll check on that,thank you very much for the reply
What do you mean by that??
"Keil" is just the name of the company - it doesn't have a version!
What specific product and/or component version(s) are you talking about?
Remember that your total executable size includes libraries - so maybe the libraries have changed...?
My problem was because the compiler version is same only Keil version was differend,so as per my understanding same compiler version should give same code at same optimization level. the linker does some optimization as well e.g. combining function tails from different modules.
Erik
No, the compiler version is not the same: MDK4.22a - armcc ver. 4.1.0.791 MDK4.23 - armcc ver. 4.1.0.894
Also, if my understanding is correct, a build without a preceeding "clean" will use a linker feedback file which will result in further optimisation. Therefore a rebuild after a "clean" is likely to produce larger code than a subsequent rebuild without a "clean".