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.

Compiler/MSP430F5335: Warning Macro Redefinition

Part Number: MSP430F5335

Tool/software: TI C/C++ Compiler

A concerning warning between macro in:

ti/ccs900/ccs/tools/compiler/ti-cgt-msp430_18.12.3.LTS/include/_atomic.h

and

ti/ccs900/ccs/tools/compiler/ti-cgt-msp430_18.12.3.LTS/include/intrinsics.h:

"/Applications/ti/ccs900/ccs/tools/compiler/ti-cgt-msp430_18.12.3.LTS/include/_atomic.h", line 108: warning #48-D: incompatible redefinition of macro "_disable_interrupts" (declared at line 129 of "/Applications/ti/ccs900/ccs/tools/compiler/ti-cgt-msp430_18.12.3.LTS/include/intrinsics.h")

How can I solve this?

  • Hi Silver,

    It appears this macro is defined in the older legacy header file "intrinsics.h" and in "atomic.h" and the compiler is confused.

    Is the code you are compiling example code or code you have written? I'm trying to understand why both header files are included in your project.

    There will be a file in your project that has "#include "intrinsics.h" or "#include <intrinsics.h>".  Can you find which file it is and tell me?

  • Hello Silver,

    I haven’t heard from you for a couple of days now, so I’m assuming you were able to resolve your issue.
    If this isn’t the case, please click the "This did NOT resolve my issue" button and reply to this thread with more information.
    If this thread locks, please click the "Ask a related question" button and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.

  • It is the code I have written.  The only resolution I can think of is to find an alternative call to disable interrupts that are not defined in two locations.

  • Hi Silver,

    Ok. I know that the msp430f5335.h header file has #include <intrinsics.h>.

    I don't know where #include <atomic.h> is coming from.  Did you explicitly add this in one of your files?

    You can always manipulate the GIE bit directly

        __bis_SR_register(GIE);  // enables interrupts

        __bic_SR_register(GIE); // disable interrupts.

  • Hi Silver,

    I haven’t heard from you for a couple of days now, so I’m assuming you were able to resolve your issue.
    If this isn’t the case, please click the "This did NOT resolve my issue" button and reply to this thread with more information.
    If this thread locks, please click the "Ask a related question" button and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.

**Attention** This is a public forum