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.

syntax error at '__interrupt' after converting from v4.2 to v5.1

Other Parts Discussed in Thread: MSP430WARE

I have installed CCS v5.1 final version and loaded the old V4.2 workspace. Most of the conversion was smooth but I am receiving a syntax error warning at '__interrupt' for all interrupt definitions. For example:

 

 

 

 

#pragma

 

 

void Interrupt_SD16A_ISR(void)

Have I missed something? Is there an updated syntax for this?

Warm Regards,

Bradford

vector=SD16A_VECTOR

__interrupt

  • I don't know what happened to hat post but the lines read:

     

    #pragma vector=SD16A_VECTOR

    __interrupt void Interrupt_SD16A_ISR(void)

     

    this is reporting a syntax error at '__interrupt'

    -B

  • Bradford Backus said:
    I have installed CCS v5.1 final version and loaded the old V4.2 workspace.

    I would recommend using a new workspace for CCSv5 and importing your v4 project into it. The v5 projects are of a different format and a conversion happens when v4 projects are imported into v5. There were also some indexer issues identified which would result in syntax errors similar to what you are reporting. It should not happen if you open a new workspace in CCSv5 and import your project into it. Please give this a try and let us know if you still have problems.

  • I don't think it's a workspace problem. I got the same issue, with a separate workspace and inported project(s).

    It really looks more like a syntax problem.

    BTW, are there any code examples for the new compiler? That would solve some questions

  • Hi,

    Did you try MSP430Ware? This has several example codes for the MSP430 family of devices, including the definition of symbols and interrupts.

    Regarding the __interrupt keyword, I am not entirely familiar with that but I wonder if a build option (Enable GCC extensions, for example) was somehow dropped during the import process... Just a guess.

    Hope this helps,

    Rafael

  • I did install MSP430 ware alltogeher with CSS5, but didnt deal with the example whereabouts enought (I have searched for them in a try or two). I'll get bac to that later.

     

    Your guess about the project properties are right - Enable support for GCC extensions were switched off, but it didn't help when i checked it out - the syntax error was still there.

     

    Thanks,
    Istvan.

  • Istvan,

    I just stumbled upon a remark in the MSP430 compiler User's Guide that may explain the issue with __interrupt:

    Use the alternate keyword, __interrupt, if you are writing code for strict ANSI/ISO mode (using the
    --strict_ansi compiler option).

    Check section 5.5.2 of the MSP430 Compiler User's Guide (link here).

    Regards,

    Rafael

  • Dear Desouza,

    Indeed I found a very short chapter about this issue. I tried changing the --strict_ansi compiler option but nothing really changed.

    I must say, I still think this is a bug, since there is no clear answer to this on any forum, even thoug it's a mass-issue.

  • Istvan,

    Many of the MSP430 C code examples included in MSP430Ware deal with interrupts and do use this syntax. I have imported projects that use this syntax and do not see a syntax error in the editor.

    Could you check the following settings in your CCS:
    Right-click on the project, go to Properties->C/C++ General->Launching, and make sure that "Run with build" and "Run as you type" boxes are unchecked.

    If you have ensured these settings are correct, have tried new clean workspaces, as well as examples from MSP430Ware and continue to see the problem, please attach your project here so we can try to duplicate the issue.