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 colouring bug in static interrupt

Hi Folks

I'm using CCS v6.0.1.00040 on Windows 7. I have a C file in a C2000 project. If I define a function like so:

static __interupt void my_isr (void) {
    CPU_enableGlobalInts(someStructType.cpuHandleMember);
    //...
}

The syntax colouring of the code inside the function,  CPU_enableGlobalInts function name (purple) and the cpuHandleMember (blue) does not work, although the colouring of the function name and keywords themselves (i.e. the `static __interrupt void my_isr(void)`) continues correctly.

If I remove any single keyword; `static` or `__interrupt` or even the leading `void`, then the colouring is immediately corrected.

This also happens using the plain old `interrupt` keyword in place of the `__interrupt`

I did check if I could alter this behaviour via the CCS Window > Preferences panel, but as it seems to be a matter of what CCS believes consitutes a correct C function I did not find a way of altering this. Maybe it's part of the CDT if not CCS?

Seasons greetings!

  • Just noted that the following works for the coloring:

    __interrupt static void my_isr (void) {    // Note __interrupt is now first...

    But upon building this, I receive a warning that the storage class is not first...

    P.S. Intrinsic types are still coloured correctly, but then they seem to be coloured anywhere regardless of correctness of containing blocks...

  • I've found that this is still an issue in CCS V6.1.0.00104.
    Note also that non-intrinsic types (e.g. typedef'd types are also missing their syntax colouring).
  • Oop, just noticed that also in v6.1, the __interrupt keyword is now allowed before the storage class, as is shown in SPRU514, without a build warning. This alleviates the issue.