Compiler/MSP430FR5969: incorrect execution when optimizer is enable on inline function in interrupt

Part Number: MSP430FR5969

Tool/software: TI C/C++ Compiler

When I compile w/ optimizer enabled, a variable passed to an inlined function from an ISR is incorrectly assumed to be 0. 

The issue occurs at line 175 in USCII2C.cpp:

else if(isWrInt)

    UCB0TXBUF = curCmd;

even if isWriInt == 1, the following line is not executed. If I turn off the optimizer, it works.

Code here: 

1 Reply

  • Your project builds with MSP430 GCC compiler version 4.6.3.  This is a relatively old compiler.  Is it practical for you to upgrade?  Please do that by using the Apps Center feature in Code Composer Studio.  I am not certain that upgrading will fix your specific problem, but I think your chances are good.

    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.