This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
We have 2 verions of CCS i.e. v5.4 and v4.2, when we complie code for MSP430G2553 in both the versions and if we see the .map file the code size generated is different. with v4.2 we are getting 10766bytes but for v5.5 getting 18565bytes, we tried to optimise code in v5.5 by changing the sttings under the optimisation where optimisation level set to 4 but still not changed. So please let us know what is the difference between both versions and how to optimise the code.
Best Regards,
Santosh.
Likely, the reason isn't the compiler optimization but rather a change in the runtime library or the C standard library.
Likely, more library code is linked into the project than before, for some (yet unknown) reason.
You should not only compare the total size in the map file but also check the individual entries. Are there additional ones? Which ones differ most? All? Or only a few? Also, the project settings may have changed in a different area. e.g. enabling floating point support for printf adds lots of code even if your source code hasn't changed at all.
AFAIK there's also a difference in global variable initialization. in the legacy COFF mode, uninitialized variables weren't initialized to zero at startup. In new EABI mode they are (but this only adds a small loop to the startup code)
**Attention** This is a public forum