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.

Programming Question About Inlining function Calls

Hello:

My question concerns the use of the #pragma FUNC_ALWAYS_INLINE in CCS v 6.0.0.00190

I have some functions that I declare as inline and then call from an ISR. Upon building, I get a warning "Recommend moving function call away from ISR, or inlining the function, or using pragmas". I get this message regardless of how I set my optimization level.

If I also preface the function with the #pragma, I still get the warning. Isn't the #pragma supposed to force inlining?

Thanks

  • If you want to know whether your function has been inlined you'll need to look at the disassembly or the .map file

    From what I've seen, the ULP advisor (which produces this warning) looks at the source code rather than the resulting assembly. That means it warns about things which have already been resolved by the optimizer.

  • Nicholas Ipri said:
    and then call from an ISR. Upon building, I get a warning "Recommend moving function call away

    When it’s really a call to a function than the compiler is right, maybe you could show us the code you want to inline.

**Attention** This is a public forum