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.

Compiler/TMS320F280049M: Different Optimizer Level cause TMS320F280049 acted with different result

Part Number: TMS320F280049M

Tool/software: TI C/C++ Compiler

Hi Team,

  My Customer using LTS16.9.3 asTMS320F280049 compiler in digital power control,  while in different optimizer level, the power module acting as different way. with optimizer -off, the power module worked as normal,  but with -o2/-3,  the power module doesn't worked,  now has configured the control related file and CLA related file optimization level as -off while the project setting as -o2/-3,  the power module worked well,  and also has provided the "Assembly language tools user's guide" to customer.

  Need your team kindly support on below items:

  1) Guides for C language coding, especially for variable definition/structure definition/pointer usage, 

  2) Application notes for how to implement the optimization level;

  3) comments on customers' project properties;

Below is the project properties:   

C2000 Compiler

-v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 -O3 --include_path="D:/Projects/OBC11kW/trunk/Primary_PFC1/PFC1_INV_BDC_APP_SVN48323_20180206_05_op" --

--advice:performance=all --define=DEBUG --define=_FLASH --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number

 

C2000 Linker

-v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 -O3 --advice:performance=all --define=DEBUG --define=_FLASH --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number -z -m"OBC_APP.map" --heap_size=0x200 --stack_size=0x400 --warn_sections -i"D:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.3.LTS/lib" -i"D:/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.3.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="OBC_APP_linkInfo.xml" --entry_point=code_start --rom_model

 

Expect for your reply, thanks.

 

Best Regards

Benjamin

  • Benjamin Zhou said:
    with optimizer -off, the power module worked as normal,  but with -o2/-3,  the power module doesn't worked

    This often happens when the volatile keyword is not used as needed.  Please see this article about volatile for more detail.  If that doesn't solve the problem, then it needs to be narrowed down to something more specific.  Something along the lines of "The code does AAA, when it ought to do BBB."

    Thanks and regards,

    -George