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,
Compiler: CCSv4.0.2.01003 (32K Object Code Limited MCU Core), Target: TMS320F2812
Project Status: Migrated from CCSv3.3
I'm posting another thread sperately here. ( http://e2e.ti.com/support/development_tools/f/81/p/3136/10826.aspx#10826)
Below (in blue) is the portion of comments that I had posted in the above thread.
====================================================================================================================================
1. Yes it seems like Build-Time-Optimization is causing the problem. But in Build-Options/Settings optimization is NULL. Actually this is a v3.3 migrated project in which the optimization was NULL. I see some more check boxes in v4.0 Build/Link-Settings. I was keeping the Build and Linker Settings as such as the migration resulted execpt for the modifications suggested in 'Known Issues' with migration in wiki. Can anyone explain specifically the different levels of optimizations in v4.0 and where are they configured?
A snippet of my problem is:
void LocalFun(void)
{
Uint16 t1, t2, t3;
- - -
for (t1 = 0; t1 < 256; t1++)
{
do some calc with t2;
do some calc with t3;
}
}
In the above piece of code, in most cases, t2 and t3 could be viewed in the 'Local Watch' window. But not t1, for which its showing 'identifier not found' in value column. t1 is only used for loop-indexing. Seems like t1 got optimized out.
Which specific optimization might be causing this? How this type of optimization could be disabled?
====================================================================================================================================
1. I still have problem seeing values of local variables in 'Local' watch window. It seems result of some optimization: because some local variables within a function could be seen and some within the same function could not. Does anyone faced a similar problem?
2. Has there a doc similar to spru514c (TMS320C28x Optimizing C/C++ Compiler) for CCSv4?
3. Can anyone explain in detail how to configure 'CCSv4 > C/C++ Build > C2000 Compiler and C200 Linker' in order to fully turn-off optimization?
Thanks for any help
-Sinoj
Sinoj,
1) For the 'local watch' issue, were these same local variables visible in CCS 3.3 watch window for this project? Which version of C2000 compiler were you using with CCS 3.3 and what were the project build options?
2) The C28x Optimizing Compiler Users Guide SPRU514C also applies to CCS v4.
3) The different optimization options are documented in the Compiler Users Guide. In general, setting optimization level to None under Basic Options should be enough, but you should probably check under the other categories (such as "Runtime Model Options" and "Optimizations" ) that no other optimization related option is set.
Aarti,
1. I was using v3.3 eval version and it got expired so I switched to v4.0. So I don't have a running v3.3 to compare. But I've the v3.3 settings from .pjt file as below:
CCSv3.3:
["Compiler" Settings: "Debug"]
Options=-g -q -ss -al -o0 -fr"E:\Transponder\DSP_Code\Debug" -fs"E:\Transponder\DSP_Code\Debug" -i"..\include" -i".\include" -d"HONEYBELL_3" -d"PIN_RX" -d"_DEBUG" -d"LARGE_MODEL" -d"NO_HARDWARE_PULLUPS" -ml -mt -v28
["Linker" Settings: "Debug"]
Options=-q -c -m".\Debug\Hudson_PIN_Flash.map" -o".\Debug\Hudson_PIN_Flash.out" -stack0x400 -x -l"rts2800_ml.lib"
CCSv4.0:
Project > Configuration Settings > Tool Settings > C2000 Compiler > All Options:
--silicon_version=28 -g -O0 --define="HONEYBELL_3" --define="PIN_RX" --define="_DEBUG" --define="LARGE_MODEL" --define="NO_HARDWARE_PULLUPS" --include_path="D:/Program Files/Texas Instruments/ccsv4/tools/compiler/c2000/include" --include_path="../include" --include_path="../src/include" --quiet --diag_warning=225 --sat_reassoc=off --large_memory_model --unified_memory --fp_reassoc=off --c_src_interlist --asm_listing --asm_directory="E:/Transponder/DSP_Code/_debug_asm" --obj_directory="E:/Transponder/DSP_Code/_debug_obj"Project > Configuration Settings > Tool Settings > C2000 Linker > All Options:
-m"Hudson_PIN_Flash.map" --stack_size=0x400 --no_warnings --warn_sections -i"D:/Program Files/Texas Instruments/ccsv4/tools/compiler/c2000/lib" -i"D:/Program Files/Texas Instruments/ccsv4/tools/compiler/c2000/include" -i"E:/Transponder/DSP_Code" --reread_libs --rom_model
-Sinoj
Sinoj,
Did you try removing optimization completely to see if that helps? It looks like it is currently set to -o0 (level 0). Try changing this to None.
Another thing to try: If you know the version of compiler that was used in CCS 3.3, try using the same version with CCS v4. To change the version of compiler used in CCS v4, please refer to this article: http://tiexpressdsp.com/index.php/Compiler_Installation_and_Selection