Hi,
We have problem with compiling some files in project fo F28388D microcontroler. When we build project with optimization turned off (Ooff) everything is OK. Same is for optimizations O0 and O1. But when we set O2 optimization, as I mentioned, we have problem. Building only one file, we got next message:
**** Build of configuration Debug for project C2000 ****
"C:\\ti\\ccs1120\\ccs\\utils\\bin\\gmake" -k -j 8 OS_COMMON/Monitor/cmd_CL.obj -O
Building file: "D:/C2000/010_Common/OS/Monitor/cmd_CL.c"
Invoking: C2000 Compiler
"C:/ti/ccs1120/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu0 --vcu_support=vcrc -O2 --opt_for_speed=2 --fp_mode=relaxed --fp_reassoc=on DELETED INCLUDES --advice:performance=all --define=_FLASH --define=DEBUG --define=CPU1 -g --symdebug:dwarf_version=4 --c11 --c++03 --relaxed_ansi --float_operations_allowed=all --printf_support=full --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --gen_data_subsections=on --abi=eabi --cla_background_task=off --cla_signed_compare_workaround=off --silicon_errata_fpu1_workaround=off --sat_reassoc=off --preproc_with_compile --preproc_dependency="OS_COMMON/Monitor/cmd_CL.d_raw" --obj_directory="OS_COMMON/Monitor" "D:/C2000/010_Common/OS/Monitor/cmd_CL.c"
>> Compilation failure
OS_COMMON/Monitor/subdir_rules.mk:16: recipe for target 'OS_COMMON/Monitor/cmd_CL.obj' failed
TP>> internal error: Bad kind: TYPE::type_pointed_to
This is caused by a defect in the TI C/C++ Optimizer.
TI Customer Support may be able to suggest a workaround to avoid this.
Upgrading to the newest version of the compiler may fix this problem.
Contact TI in the E2E support forums at http://e2e.ti.com under
"Development Tools", "TI C/C++ Compiler". See the link titled
"Submitting an issue".
We need to see this ENTIRE error message and a complete, reproducible
test case including ALL of the command-line options.
Include the .pp file created by option --preproc_with_comment
gmake: *** [OS_COMMON/Monitor/cmd_CL.obj] Error 1
**** Build Finished ****
I also paste part (function) of cmd_CL.c file for which we believe that caused this error:
static inline __erase_vector __parse_args(uint8_t* ptrInput, uint8_t* argv[]){
__erase_vector erase = none;
if(!make_argv(ptrInput, argv, 0, 1)){
/* signal bad arguments keeping erase at zero */
}else if(argv[0][0]){
/* raise appropriate erase flags */
uint8_t sw = get_switch(argv[0]);
if(ch_equ_nocase(sw, 'a')){
erase = all;
}else if(ch_equ_nocase(sw, 'r')){
erase = ram;
}else if(ch_equ_nocase(sw, 'f')){
erase = flash;
/* TODO: check flags for board-specific memories */
}else{
/* do nothing - erase is zero */
}
}else{
/* no arguments given - erase all */
erase = all;
}
return erase;
}
Just to say that this file successfully compiles (with O2 optimization)with some othe compilers (e.g. for C66 or RM57).
Thank you.