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.

what is the proper way to use WEAK function in Code Composer Studio?

Part Number: MSP430I2030

Hi,

I am trying to develop a library that will be used by several MSP430 based projects, I will therefore need to declare some weak functions as placeholders in library code, then have them override in application code.

The following is what I gathered from old posts on the forum. Could someone comment on if they will work? I was able to compile with TI-compiler V20.2.5 LTS.

// library.c__attribute__((weak)) void myFunction() {};
// application.c
void myFunction()
{
    // do something
}

Thanks in advance.

ZL