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.

Compiler doesn't recognize 'CSR' (Control Status Register)

Other Parts Discussed in Thread: TMS320C6678

Here is a snippet of code:

{
unsigned int TempInt32;

TempInt32 = CSR; /* read the TMS320C6678 Control Status Register */
...
}


The following command is invoked by CCS (version 5.4.0.00091) to compile the file:

        D:/ti/ccsv5/tools/compiler/c6000_7.4.2/bin/cl6x" -mv6600 filename.c

The compiler reports the following error:

        "filename.c", line n: error #20: identifier "CSR" is undefined

Shouldn't the compiler recognize "CSR"?  How can I eliminate this compiler error?

  • Hi Eric,

    Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages (for processor issues). Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics (e2e.ti.com).

    Welcome to the Keystone Forum!

    This forum is for issues with keystone devices its peripherals as well as any SDK used on keystone platforms, including:

    1. MCSDK (Multicore Software Development Kit)
    2. Desktop Linux SDK
    3. MCSDK Video

    When asking a question, please include:

    Which version of MCSDK you are using
    Which processor and board platform (EVM & its revision) you are using
    If relevant, the version of your components
    If relevant, which version of the compiler and Code Composer Studio you are using
    If the issue happens with a specific API, please provide the source code used
    If the issue happens at run-time, please provide a detailed description of the problem and the expected behavior.
    Provide attach relevant Message Log or Kernel/Object View debug info or screen captures of the real time analysis tools.

  • My question was in regards to the TMS320C6678 device.  Did I post my question in the correct forum?

  • did you include c6x.h?

    Kind regards,

    one and zero

  • I did not have c6x.h included.  So I added the following:

    #include <c6x.h>

    And the compiler error is now "... could not open source file "c6x.h""

    I have pdk_C6678_1_1_2_6 installed on my PC, and I did a Windows file-search for "c6x.h" and it was not found.  Where is <c6x.h>?

    Eric

  • depending on your installation path (CCS version and Compiler version):

    C:\ti\ccsv6\tools\compiler\c6000_7.4.11\include

    Kind regards,

    one and zero

  • I found c6x.h where you described and that solved the issue.  Thanks for your help!

    Eric