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.

pragma FUNCTION_OPTIONS on TMS470



I'm trying to use #pragma FUNCTION_OPTIONS when compiling C source code for a Cortex A8 using the compiler cl470, version 4.6.3. I get a warning, "unrecognized pragma" no matter how I format it.

What I want to do is to override the global optimization level for certain specific functions. I've tried the following:

#pragma FUNCTION_OPTIONS(funcName, "-O1")

#pragma FUNCTION_OPTIONS(funcName, "O1")

#pragma FUNCTION_OPTIONS(funcName, "--opt_level=1")

#pragma FUNCTION_OPTIONS(funcName, "opt_level=1")

None of these will work. Does the compiler not support the FUNCTION_OPTIONS pragma at all, or is it the option that I want to use that is not supported?

I must say I find TI's documentation sadly lacking both in detailing which options may be used and how the directive should be formatted. A simple example would have been useful.