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.

CCS: DSP CCS semantic errors

Tool/software: Code Composer Studio

Hello,

DSP has an option to defined registers as C variables using the __cregister keyword (i.e. extern volatile __cregister DNUM)

The problem is that it seems CCS has a problem with it and the indexer does not recognize this and keeps issuing semantic errors for these variables (there are no errors in compilation).

I have tried several CCS versions (and also tried several different DSP tools versions) but nothing works - all have the same problem.

Do you know / have any idea how to resolve this?

Thanks

Guy

  • Hi Guy,
    Can you provide a small example source? Also, which device are you using?

    Thanks
    ki
  • Hi,
    I am working on TDA2xx - The specific issue was encountered on the code of the DSP core
    as an example you can just have a simple C file

    #include <c6x.h>

    unsigned int coreNum
    int main()
    {
    coreNum=DNUM;

    return 0;
    }

    even though DNUM is an extern register variable defined with the c6x.h file , CCS still issues semantic error for it.

    In the meanwhile i managed to bypass the annoying error by using
    #ifdef __CDT_PARSER__
    #define DNUM 1
    #endif

    where what is under the __CDT_PARSER__ ifdef is seen only by the CDT parser so it does nothing to the actual compiled code and still makes the parser aware of the named variable.

    If you have any better solution to fix the actual indexer problem it would be much appreciated

    Thanks
    Guy
  • Hi Guy,
    Thanks for the test case. I was going to write that I could not reproduce the error. But then I check my Codan settings and enabled the "Coding Style" settings. Now I see the error. These settings are disabled by default. Did you explicitly enable this settings? If not, what version of CCS are you using?

    Thanks
    ki
  • Hi,
    I tried on CCS version 7 , 7.4 and 8 with the same outcome.
    I haven't changed any settings regarding the indexer, also i checked and the CodingStyle option under C/C++ Code Analysis preferences is off

    Thanks
    Guy
  • Hi Guy,
    Sorry for the delay. I have ask for more input from one of the engineers most familiar with the indexer. I will keep you posted when I get an update.

    Thanks
    ki