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.

could not open source file "csl.h"

Hi everyone

 i am getting a - could not open source file "csl.h"  error when i am compiling the my code.

I used the code before on the code composer 3.1 and it worked but now i am using ti on the ccsv4  but its giving me the csl.h include error when comiling.

 

Any body have an idea on this

  • Hi habeeb,

    Have you referred this?

    http://processors.wiki.ti.com/index.php/Importing_CCSv3_Projects_into_CCSv4

    Have you updated your include path with the location of your CSL as stated in this wiki?

    Regards,

    Sid

  • I have tried that but in main .c  it still says "could not open source file "csl.h"

  • CCSv4 does not ship with CSL. You can use the same CSL version that comes with your CCSv3.1 install. Just add the path to the CSL header files to your include build options. You can do the same for the CSl library itself in the linker options.

    Thanks

    ki

  • Thank you very much. I do not have the  code composer 3.1 with me . i had uninstalled the code composer3.1 and then installed  code composer v4.

    Is there any source from which the csl header files could be downloaded.

     

    I am also not able to access the include build options . If you please direct me on that as well. Thank you very much

  • habeeb siddique said:
    Is there any source from which the csl header files could be downloaded.

    http://processors.wiki.ti.com/index.php/CSL

    habeeb siddique said:
    I am also not able to access the include build options

    Right click on your project and select "Build Properties" in the context menu. Then select "C/C++ Build" in the left panel. In the right panel under "Tool Settings" tab, you can get to the Compiler and Linker options. The include build options are under "Include Options"

    ki

  • I have found  the "6000 Linker" under the "Tool Settings" tab, but underneath  "6000 Linker" i have not been able to find the "Include Options". I found   "File Search Path" option under   "6000 Linker" option.

    This is the action taken.

    1. I clicked on the   "File Search Path" option under   "6000 Linker" option.
    2. I clicked on the " add note " icon on the " Include library file or command file as input " box.
    3.  a new box with title " Add file path " came up . I put in " c:\Program Files\C6xCSL\include" and pressed ok .
    4. press debug

     

    the result:

    The " could not open source file 'csl.h' " error still occurs.

  • I dont remember exactly, but I once had a similar problem, when porting project from CCS3.3 to CCS4.

    It turned out that since CCSv4 is based on eclipse, the path of the project file should have exactly opposite slashes in the path as compared to CCS3.3. So a backslash (\) in the path needs to be replaced with a forward slash (\). See if that works.

    Regards,

    Sid

  • i have replaced the " \ " back slash by "/ " front slash but the " could not open source file 'csl.h' " error still persists.

  • You can try out one more thing.

    Copy the csl.h file from the present location into your project folder. Then explicitly define the path in your project file, as in

    #include "C:\project_name\...\csl.h"

    and see if it recognises the path/ takes up the correct file.

    Also, try to ensure that your path doesnt contain spaces as it is doing right now. Sometime some eclipse based softwares dont recognise files containing spaces in their path. (eg. here Program files). Try to use undersocre isntead.

    Regards,

    Sid

     

  •  i changed the include path explicitly in the files by writing the whole path name and also by explicitly adding the csl.h file to the project files . it still presents the same error  " could not source file 'csl.h'  "

    the error " could not source file 'csl.h'  "means it cannot open the csl.h header file. do you think the issue is not with file being added or not but being not able to open the file.

    can there be any restrictions on file access???

     

  • habeeb siddique said:

    I have found  the "6000 Linker" under the "Tool Settings" tab, but underneath  "6000 Linker" i have not been able to find the "Include Options". I found   "File Search Path" option under   "6000 Linker" option.

    This is the action taken.

    1. I clicked on the   "File Search Path" option under   "6000 Linker" option.
    2. I clicked on the " add note " icon on the " Include library file or command file as input " box.
    3.  a new box with title " Add file path " came up . I put in " c:\Program Files\C6xCSL\include" and pressed ok .
    4. press debug

     

    the result:

    The " could not open source file 'csl.h' " error still occurs.

    You need to add the path tio the CSL header files in the "Include Options" under "C6000 Compiler".

    You add the actual CSL library under the "File Search Path" in the "C6000 Linker"

     

  • Mr. Lee. it worked i do not have the "csl.h " error now. the path  should be included under the c6000 compiler " include options" option

    how do i add the actual library in the c6000 linker..

    • do i add the path to the " lib_2x"  and " lib_3x" or to jus one of them

    I have also an error " could not open source file "std.h".

  • habeeb siddique said:

    how do i add the actual library in the c6000 linker..

    • do i add the path to the " lib_2x"  and " lib_3x" or to jus one of them

    You add the actual library under the "File Search Path" in the "C6000 Linker". Use --library option to specify a library file. Use --search_path to specify a search path if you are referencing the library in a cmd file.

    habeeb siddique said:
    I have also an error " could not open source file "std.h".

    Is this a BIOS project?

  • no this is not a bios project this a live voice streaming project

    i do not have a file which says jus library or lib, but i have 2  files with lib . which one do i choose


  • I have an error " cannot open file "c:/Program Files/C6xCSL/include":  Permission denied  "

     

  • habeeb siddique said:
    I have an error " cannot open file "c:/Program Files/C6xCSL/include":  Permission denied  "

    This error sounds like you put the CSL header include path ("c:/Program Files/C6xCSL/include") as a --library option in the "File Search Path" in the "C6000 Linker". You need to add that path to the --include_path option in the "Include Options" under "C6000 Compiler".

    Under the --library option in the "File Search Path" in the "C6000 Linker", you specify the library itself (ex: myCSL.lib). If you what to add a search path where all your libraries are, you can add it to the --search_path option (ex: "c:/Program Files/C6xCSL/lib")

    ki