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.

SPI Programming error in C6678



While building a simple program it is showing following error:

C:/ti/pdk_C6678_1_1_2_5/packages/ti/csl/cslr_device.h", line 45: fatal error #5: could not open source file "ti/csl/cslr.h"len

Please give me a solution to this problem

  • Hi Anand,

    Can you check if you configured correctly the path to your pdk_C6678_1_1_2_5 path in your project (C:/ti/pdk_C6678_1_1_2_5/packages)? please check if the path is included or add the path in project properties->C6000 Compiler-> Include Options

    Thanks,

    HR

  • HI,

    I have included these paths:

    C:\ti\pdk_C6678_1_1_2_5\packages\ti\platform\evmc6678l\platform_lib\include

    C:\ti\pdk_C6678_1_1_2_5\packages\ti\platform\evmc6678l\platform_lib\src

    C:\ti\pdk_C6678_1_1_2_5\packages\ti\csl

    C:\ti\ccsv5\tools\compiler\c6000_7.3.4\include

    C:\ti\pdk_C6678_1_1_2_5\packages

    But it is again showing some other errors.

    So please help me regarding the same.

  • Hi Anand,

    It depends of what libraries you are using in your project, you will have also to add the libraries to the project linker, are you running an example project?

    Thanks,

    HR

  • Hello Sir,

    Thanks for your reply. I included some .H files , some .C  files and calling the functions from those libraries

    and using those functions but getting error if you can please go through the code which is given below

    #include<evmc66x_spi.h>
    #include<stdint.h>
    #include<c6x.h>
    #include<evmc66x_spi.c>
    void main(void) {
    while(1)
    {
    spi_write_word();
    }
    }
    spi_write_word
    (
    uint16_t* cmd_buf,
    uint32_t cmd_len,
    uint16_t* data_buf,
    uint32_t data_len
    )
    {
    SPI_SPIDAT0=1;
    spi_delay(10000);
    SPI_SPIDAT0=0;
    spi_delay(10000);
    }

  • Hi Anand,

    Please check the file - pdk_C6678_1_1_2_5\packages\ti\platform\evmc6678l\platform_lib\src\evmc66x_spi.c and don't forget to add the library,

    Thanks,

    HR

  • Hi,

    Thanks for your reply. Is there any SPI programming guide for C6678?  I am facing other difficulties in programming also. If there is any programming guide please

    send me the link.