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.

#1965 cannot open source file "CTS_HAL.h"

Hello everyone,

There's a project that I have to submit tomorrow. A last minute error has popped up. Everything was working fine then I copied all of the files to my external hard drive as a backup, then something went wrong and I'm getting this error. Every file is where it was before. But I'm still getting this error. I need help!

As you can see from the screenshots below I tried several stuff and still couldn't get it working.

Note: I'm using a MCU. 

Screenshot 1:

Screenshot 2:

 Screenshot 3:

Please help me fix this. 

Thanks,

John

  • I see one thing wrong but I suspect there is something else as well.

    In your 3rd screen show showing the project options, the box for include paths should not include any file names. These paths are passed to the compiler as places to look for files. The names of the files themselves come from your source and shouldn't be there. So try removing the file name from the path there.

    If you still get an error after that please send a screen shot of project6 expanded.

    Regards,
    John
  • Hi John,

    I removed the file name from the path. But I'm still getting the same error. What do you mean by

    JohnS said:
    screen shot of project6 expanded
     since it's 1300 line of code I'm slightly confused.

    Best Regards,

    John,

  • The error is being reported within the project file itself.  This is odd.  I suspect that something is wrong with how files were added to the project.

    Can you take a capture of the project expanded within the project explorer like this:

  • Hi John,

    When I double click on the error, it takes me to the header file named as CTS_Layer.h and even though the location of the error is stated as line 67, it appears to be there's nothing written in the file ( CTS_Layer.h) when I go in the folder where the file is located and Open the file using Notepad and copy & paste the content to the empty file in the CCS and try to build the project then the same error occurs when I double click on it, this time it takes me to the header file ( CTS_Layer.h) and highlights the line:

    #include "CTS_HAL.h"

    Just like you can see on the first screenshot.

    The expanded project6 is as follows:

    Best Regards,

    John.

  • John,

    Thanks John. I was wondering if something was odd in the project but it looks ok.

    On line 67 change the include statement to be just #include <CTS_HAL.h>
    You don't want the full path there. The compiler will use the paths specified in the project options to look for the file.



    Regards,
    John
  • John,

    I had the same thing again even when I changed line 67 to #include <CTS_HAL.h> 

    Could I be doing something wrong?

    There's a screenshot:

    Best Regards,

    John.

  • I have noticed something!

    The error location that is stated is not right. The header files are located in the header folder:  C:\Users\mbgm2cg3\Desktop\placement\header  

    However, the error location says C:\Users\mbgm2cg3\Desktop\CTS_Layer.h 

    There isn't even such file located on the desktop.

    What do you think about that?

  • Can you save off the output in the CCS build console to a text file and attach it there?
    http://processors.wiki.ti.com/index.php/Build_Errors_in_CCS#General_Tips

    Also could you zip up all your project files (.*project) from the project directory and attach that as well?