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.

Strange "Syntax Error"

Other Parts Discussed in Thread: MSP430F5659

I am coding MSP430F5659 using CCS5.5 and I am getting some errors below:

The first one is 'Unresolved inclusion "drivelib.h"'.  But it does use the file an compiles fine.

The second one is the Syntax error for the isr, line 6 read the following:

__interrupt void USCI_A2_ISR(void) {

Why would it not not recognize the interrupt?  The problem is, the project compiles fine but it never does enter the ISR.

Any help would be appreciated

  • Your code doesn't use anything from driverlib.h, so the failed inclusion does not break compilation.

    For the syntax error, well, the popup covers the offending text, so I can't say what went wrong. Possibly a typo.

  • The first (and probably the second) errors appear to be Eclipse-isms. Eclipse has what amounts to a second C compiler which attempts to statically detect errors, but doesn't do it very well, often reporting errors that aren't errors. The CCS people have done a pretty good job of muzzling these oddities but they creep through occasionally.

    The fact that the #include and __interrupt actually succeeded when you built it suggests that those "errors" are indeed bogus.

    Curiously, my copy of msp430f5659.h includes a commented-out definition of the name USCI_A2_ISR. Given that it's commented out, it obviously shouldn't cause trouble, but all the same try naming your ISR something different and see what happens.

    As to why your ISR isn't called: the relevant code is probably elsewhere. What does your initialization look like?

    Unsolicited: UCRXIFG and UCTXIFG are bit definitions, not IV definitions, so your switch statement won't do what you want. I suspect you should be using USCI_UCRXIFG/TXIFG instead.

  • Jens-Mechael

    You are absolutely right, the reason why it compiled is because I did not use driverlib.  So actually it was not finding it.  Thank you...

    Bruce,

    Actually, it ended up even worse, it drove me crazy having these errors show up.  So what I did is I started a brand new project, copied source files to it, added driverlib include dir and it started to work just fine, and the isr call error disappeared.  Should not have to do that, CCS is full of miracles.  Thank you for catching the UCRXIFG, it should have been USCI_UCTXIFG instead.

**Attention** This is a public forum