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.

MSP430F427: Error[0]: Invalid Syntax when compiling the project

Part Number: MSP430F427


Hello Everyone,

I have a project which is a mix of C and Assembly and is build on a very old IAR EW version. Micro used in the project is MSP430F427.

Header files is in C and rest are all assembly files. 

When revisiting the project now on the newer IAR platform (v8.20), it throws the following error while compiling:

Error[0]: Invalid Syntax

Could anyone please guide me here on what needs to be done?

Thank you!

Samarth

  • Hi Samarth,

    There are multiple causes for this issue, so you could check the following:

    Samarth Kapoor said:
    When revisiting the project now on the newer IAR platform (v8.20)

    1) You could try to check the release notes for the IAR Assembler for MSP430. There might have been changes in the syntax which then causes the issue with your old code.

    2) Besides, you could have a look at the Mixing C and Assembler With MSP430 MCUs Application Report, as this gives a general guidance on using C and assembler code together in an application running on MSP430 microcontrollers.

    3) You could also check if the Project Target Device set in the project settings contradicts the device header file that you use.

    4) Can you check to which line in your code the error message points to? This should give a hint on whats actually wrong. Is it possible that any of the files you're using is obsolete or not intended for the compiler (but for a different, older compiler version?)?

    If none of those work for you please provide more detail from 4) to pin down the root cause of the error message.

    Thanks and best regards,

    Britta

  • Hi Britta,

    Thank you so much for your reply.
    Looking into the release notes for IAR assembler, project was using one of the now defined control directive as a variable.

**Attention** This is a public forum