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.

Can not open Header File

I want to include one header file in my new project "DSP2833x_Device.h". I copy this header file from another project and past it into the include folder of my new project in ccs 5.2. But this file do not appear in file tree where all other header files are visible. Also on building the project error message appears

can not open source file "DSP2833x_Device.h

You can see "DSP28xProject.h" is in same include directory and visible in the include files tree in the image below and is accessible in the project but  "DSP2833x_Device.h" neither show in the include file tree nor is accessible. Similar is the case if I copy any other file in the include folder, it do not appear in include files tree and is not accessible in the main program

its a new project and dont use any link variables to link the files for making project portable. Any solution please?

Best Regards

Shahid

  • Hello Shahid,

    Try clicking on the folder in CCS and then pressing F5. You might need to close and then reopen the project.

    Also, why not just include it in your application's root folder or any other folder in your application's file hierarchy and then update the includes project setting.

    Stephen

  • Dear Stephen

    I created new folder in work space of CCS5 and included this folder in include path of the project. Header files are visible in this include path from project tree but still error persists that can not open source file as shown in figure below

      

    Best Regards

    Shahid

  • Could you please post your the include path statement.

  • Dear stevenh

    This is the automatic include path generated in the installed directory of CCS when I created an empty project

    "${CG_TOOL_ROOT}/include"

    This is the directory that I created my self in the work space of the CCS and added its path in the include path for CCS

    "C:\Users\Shahid\workspace_v5_2\Include Files"

    Best Regards

    Shahid

  • That should have worked.

    Double check that the include file setting is in the Debug version.  Is it possible you put it in the release version?

    Stephen

  • Hi Shahid,

    Like stevenh saide, unless the path is configured for release and you're using debug, what you did should work.

    But I see that you also have "#66 expected a ;", where do they come from? Maybe this error is not allowing the headers being included.

    Regards

    J

  • Dear Jihannes

    I have tried both debug and release mode but no effect. And as for as you indicated the semicolon error, I have also checked3704.DSP2833x_Device.h that lines where compiler indicates errors, semicolons are there. I have attached the file and  indicated the lines where compiler gives error.

    I am sick of this work because everything looks fine but compiler gives errors for nothing

    Best Regards

    Shahid 

  • Hello Shahid,

    I noticed the Resource shows Shahid_Company_Program and not Shahid_Company_Program.c.  Is that correct?

    Also, I notice that Code Composer will sometimes decided to switch to another project in the same workspace.  Right click on the project (make sure the project is selected) and then select Build.

    Stephen 

  • Shahid,

    You seem to be doing the right steps. Is it possible that the Problems view is not getting refreshed between builds? There was a bug in some versions of CCS 5.2 where the Problems view was not getting cleared between builds, so the errors will still remain there from a previous build. PLease see this related thread: http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/217172.aspx

    To check if that is the issue you are facing, try deleting all the messages in the Problems view before rebuilding. Or you can do a Clean project before rebuilding.

  • I remember that happening in CCSv6, but I can't remember if it was only in the beta version.  It may still be happening.

    Shahid: Sorry about not relating that to your problem.  Also, I had forgotten about it.

    Stephen

  • Dear Stephan and Jihannes

    Thank you very much for your help. I changed my CCS version from 5.2 to 5.5.0. Those header files are working fine in ccs5 and code is working well. I dont know what was wrong with CCS5.2 and why those errors occurred.

    Best Regards

    Shahid