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.

CCSTUDIO-C2000: issue about the CODE_SECTION Pragma

Part Number: CCSTUDIO-C2000

Hi Team,

My customer use the CODE_SECTION Pragma followed spru514y_TMS320C28x Optimizing C/C++ Compiler v22.6.0.LTS User's Guide (Rev. Y) 6.9.4 The CODE_SECTION Pragma to locate the function which is defined by himself to specified memory location.

It will allocated successfully when this function been called directly. But when this function been called in if{} by some conditional judgment, he didn't found the function in specified memory.

He doesn't turn on code optimization.

Thanks & Regards 

Yale Li

  • Hi Yale,

    If the code is not referenced, the compiler will optimize it. I am guessing that even through it is in if{} block, but the condition will never reachable and compiler is optimizing it.

    If you want to keep the symbol, you can try #retain pragma