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.

MSPM0L1106: SysTick_Handler not found when writing c++

Part Number: MSPM0L1106

Tool/software:

Hi,

Started a project for MSPM0L1106 based on the empty cpp project in driver lib examples.

Added blinking LED in the loop with a delay and that works fine.

Wanted to use the SysTick_Handler to generate a 1ms interrupt but it ends up in the "void Default_Handler(void)" every time.

Changed filename to .c and it works. SysTick_Handler is found.

Changing filename back to .cpp and interrupt vector is not found.

What is wrong?

Would be nice with basic C++ examples where it makes sense. 

 Thanks

Helge

  • Hello Helge,

    I have some points need you confirm.

    1). What 's the IDE you used ?

    2). What's the compiler you used ?

    3). Where did you get the example code, SDK? If you used the SDK, what' s the version of the SDK?

    Best Regards,

    Janz Bai

  • Installed CCS Theia and SDK day before yesterday on MAC.

    CCS Theia 1.2.0

    TI Clang v3.2.0.LTS 

    MSPM0 SDK 2.00.01.00

    CPP example is from Driverlib "Empty CPP"

    SysTick example from driverlib

    Solution to get past the problem with TI compiler is to use 'extern "C"' in front of the declaration:

    Can not get GCC to work with the below code after importing "Empty CPP" for gcc

    //-----------------------------------------------------

    #include "ti_msp_dl_config.h"

    extern "C" void SysTick_Handler(void);

    int main(void)
    {
       SYSCFG_DL_init();

       DL_SYSCTL_enableSleepOnExit();

       while (1) {
          __WFI();
       }
    }

    void SysTick_Handler(void)
    {
       DL_GPIO_togglePins(OUTPUTS_PORT, OUTPUTS_LED_PIN);
    }

    //-----------------------------------------------------

  • Ok. Sounds good that you have resolved this issue. 

    Best Regards,

    Janz Bai