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: TI C/C++ Compiler
Hello,
Our context : TMS320F2812 DSP, CGT 6.2.0 and code composer studio versions 5 and 6
after importing a code composer 5 project into a code composer 6 environement, the build operation does not produce the same output (ascii S2 output differs).
If we look further at the generated asm or map files, generated code seems identifcal but function placement differs within some files (see the below capture)
The project is issued from a Baseline, import process issues no warning, code generation tool version is the same (6.2.0) and compiler options are identical (verified in asm generated headers)
We have no more the code composer 5 environement available, so we could not reproduce the inital generation.
Is there a builder issue ? makefile generation issue ? initial CCS 5 build parameters may have been wrongly imported or misunterpreted by CCS ? How they can influence on the function order compilation within files ?
I've also tried to play with the "--preferred_order" parameter of linker to recover the initial order but without success. This option is not so much documented.
Does anyone meet the same problem ?
Thanks by advance,
David Baltaro
David Baltaro said:after importing a code composer 5 project into a code composer 6 environement, the build operation does not produce the same output
This is not a requirement supported by CCS or the compiler. It is not documented behavior. We have no tests for it. All that said, we will try to answer your questions.
David Baltaro said:compiler options are identical (verified in asm generated headers)
Your compiler options must be identical, or you would not have gotten as close as you did. All the same, I want let you (and others who read this thread) know that this is insufficient proof that the compiler options match. The compiler does include comments in the assembly code which show the key build options used. But, it does not show all the build options. For that, you need to preserve the build logs.
I don't know why the build under CCSv6 is slightly different. One guess ... The order in which the linker sees everything, especially the object files and libraries, must be the same. Changing versions of CCS might have caused a minor difference in the order in which the linker sees these inputs. Because of ...
David Baltaro said:We have no more the code composer 5 environement available
... I suspect it is not possible to know how the linker is invoked under CCSv5.
Thanks and regards,
-George
David Baltaro said:And in 5 files over 100, function order is different.
Just within those files, the order of the functions generated by the compiler is different? If that is correct, then the difference occurs because of the compiler, and not the linker.
David Baltaro said:The remaining difference between former and actual environment is the system version Windows XP 32 bits vs 7 64 bits.
Does it has an influence over build process ?
If it did make difference, I wouldn't be able to explain it.
The version 6.2.0 compiler is about 6 years old. I have a vague memory of some bug reports about unstable sorts in the optimizer phase of the compiler. I searched through our bug database, but could not find anything. It is still a reasonable guess that there was such a compiler bug, and it has since been fixed.
What is an unstable sort? When sorting something, you need to have a "stable" policy on what happens when two things compare as equal. If you don't, then random choice causes the sort to be "unstable", or unpredictable. When such sorts are discovered, they are viewed as bugs and are fixed.
Thanks and regards,
-George