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.
Tool/software: Code Composer Studio
Dear all,
I am having a really hard time with this strange issue. So, I have 2 different projects, A and B, and both use the very same module, which contains a kalman filter routine, lets call it kalman.c and kalman.h.
Well, the thing is that when I compile these projects (CCS version 5), in one of them the size of the (.text) section that corresponds to kalman has a size of 0xBED, but for the other one it has a size of 0x1A45, which is more than the double. In the same way, the code in the project where the size is larger, it also executes slower (it takes more than double the time).
I would like to know what might be causing this, because I am checking all the compiler and linker options and flags, and everything is set exactly in the same way. Also, the target and the whole hardware is the same...
I would appreciate any kind of help or insight with this issue.
Thank you beforehand and best regards,
Jorge.
Jorge,
jorge sola said:Well, the thing is that when I compile these projects (CCS version 5), in one of them the size of the (.text) section that corresponds to kalman has a size of 0xBED, but for the other one it has a size of 0x1A45, which is more than the double.
Could you attach the linker map files from the two projects that shows the size of the .text section for this particular function? Ideally we would like to see the entire projects so we can take a closer look at the differences, so if the projects are not too large, would you be able to share both projects with us?
jorge sola said:I would like to know what might be causing this, because I am checking all the compiler and linker options and flags, and everything is set exactly in the same way.
Is the compiler version used to build both projects the same?
Also what is exact version of CCS5 you are working with?
Hello AartiG,
I found out the problem. There was actually a difference in the compilation options. In the project where the file program code was larger and slower the option "optimize fully in the presence of debug directives" (inside Runtime Model Options tab) was activated.
What does that option actually do? Where can I find better explanations of the effect and behaviour of each compilator flag? Because sometimes the descriptive name is not enough to understand it.
Thank you and best regards,
Jorge.
Thank you for the update and glad you were able to find the source of the difference.
jorge sola said:Where can I find better explanations of the effect and behaviour of each compilator flag?
The Compiler Users Guide and Assembly Language Tools Users Guide describe all the compiler and linker options in detail. You can get to the most recent versions of these guides from this page.
Note, however that the newer versions of the C2000 compiler tools (15.12.0.LTS and 16.9.0.LTS) have deprecated the --optimize_with_debug option, so with those versions the option should have no effect. I suspect you are using an older version of the compiler tools that still supported that option. I have attached below an older revision of the Users Guide that explains this option in Section 3.8.1.