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.

  • Resolved

Compiler/msp430f5335: Include function that has not been referenced.

Part Number: msp430f5335

Tool/software: TI C/C++ Compiler

I used to be able to use __attribute__ `used` to include a function that is not referenced anywhere.  It does not seem to work anymore, how do I make sure the linker keeps a function that has not been referenced?

MSP430F5335, MSP430F5359, CCS8, C++14, Windows 10

  • You are experiencing a known issue with the compiler tools.  It is discussed in this forum thread.  That user experiences it with the TI ARM compiler.  But the same issue is present in the same version of MSP compiler.

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click This Resolved My Issue on the best reply to your question
    The CCS Youtube Channel
     has short how-to videos
    The 
    Compiler Wiki answers most common questions
    Track an issue with SDOWP. Enter your bug id in the Search box.

  • In C++ 

        #pragma RETAIN()

    works...

    MSP430F5335, MSP430F5359, CCS8, C++14, Windows 10

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.