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.

CCS Build Error: fatal error #1965: cannot open source file

Other Parts Discussed in Thread: PGA2311, TM4C1294NCPDT

Hello,

Please help me correct the following error while trying to compile a project for one of the Tiva C TM4C1294 MCUs.

I get the following error during build:

"F:/Documents/GitHub/GTBE/firmware/pga_pgaLibTest/pga_pgaLibTest.c", line 23: fatal error #1965: cannot open source file "pga_pga2311.h"

The file, pga_pga2311.h, is a part of the project and is being compiled itself since if I put an error in it the compiler throws an error as would be expected.  Also, another file that is in the same exact location is not throwing the same error.

Here is a screenshot of my CCS screen:

Here is the complete console log:


**** Build of configuration Debug for project pga_pgaLibTest ****

"F:\\Programs\\TI\\ccsv6\\utils\\bin\\gmake" -k all 
'Building file: F:/Documents/GitHub/GTBE/firmware/pga_pgaLibTest/pga_pgaLibTest.c'
'Invoking: ARM Compiler'
"F:/Programs/TI/ccsv6/tools/compiler/arm_5.1.5/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me --include_path="F:/Programs/TI/ccsv6/tools/compiler/arm_5.1.5/include" --include_path="F:/Programs/TI/TivaWare_C_Series-2.1.0.12573" --include_path="F:/Documents/GitHub/gtbelib" --include_path="F:/Documents/GitHub" -g --define=PART_TM4C1294NCPDT --define=TARGET_IS_TM4C129_RA1 --define=ARM_MATH_CM4 --define=__FPU_PRESENT=1 --display_error_number --diag_warning=225 --diag_wrap=off --preproc_with_compile --preproc_dependency="pga_pgaLibTest.pp" "F:/Documents/GitHub/GTBE/firmware/pga_pgaLibTest/pga_pgaLibTest.c"
"F:/Documents/GitHub/GTBE/firmware/pga_pgaLibTest/pga_pgaLibTest.c", line 23: fatal error #1965: cannot open source file "pga_pga2311.h"
1 catastrophic error detected in the compilation of "F:/Documents/GitHub/GTBE/firmware/pga_pgaLibTest/pga_pgaLibTest.c".
Compilation terminated.
gmake: *** [pga_pgaLibTest.obj] Error 1
gmake: Target `all' not remade because of errors.

>> Compilation failure

**** Build Finished ****

Also, here is the source code:

6404.GTBE_dacLibTest.zip

Regards,
Curtis

  • Curtis,

    Try adding the include path for the location where the .h file is located.  Based on the zip I am guessing this woudl be F:/Documents/GitHub/GTBE/firmware/pga_pgaLibTest/gtbelib

    It builds the file as it is listed in the project explorer.  However I see that it is a linked file (shortcut icon), which means it is physically located somewhere else.  You need to have an include path set for that location so that the compiler finds it when it is building files that include it.

    Regards,

    John

     

  • Hey John,

    I actually have the include path setup already.  The file is located at:

    C:\Users\cmayberry7\Github\GTBE\gtbelib\pga_pga2311.h

    I have this folder in my include path as a variable, GTBELIB_INSTALL which resolves to C:\Users\cmayberry7\Github\GTBE\gtbelib as shown in the screenshots below.  I also have another file,  tw_extension.h, in the same location which is also used and appears to be included just fine.

    Any other ideas?

    Regards,

    Curtis

  • I also added the full path to the include list as shown below and the error is still there.  I also tried it on another computer with a new project except for the source files and found that it is also still the same error.

    Regards,

    Curtis

  • Curtis Mayberry1 said:
    The file is located at:

    C:\Users\cmayberry7\Github\GTBE\gtbelib\pga_pga2311.h

    I have this folder in my include path as a variable, GTBELIB_INSTALL which resolves to C:\Users\cmayberry7\Github\GTBE\gtbelib as shown in the screenshots below.

    In the first post the --include_path= compiler options all appear to be directories under F:\.

    Yet based upon this post the files are actually under C:\

    Is there any path/directory re-direction going on under Windows?

  • Hey Chester,

    The reason the drive changed was because I am now working on a different computer.   I needed to head to the office to do some other stuff so I switched computers.  I setup the project the same way I did before and am still receiving the same error.  

    The variable GTBELIB_INSTALL is set correctly for each computer so that the location is correct. (on my computer at home it is on the F: drive and on my computer at work it it is on the C: drive.

    Regards,

    Curtis

  • Curtis Mayberry1 said:
    The file is located at:

    C:\Users\cmayberry7\Github\GTBE\gtbelib\pga_pga2311.h

    I have this folder in my include path as a variable, GTBELIB_INSTALL which resolves to C:\Users\cmayberry7\Github\GTBE\gtbelib as shown in the screenshots below.

    My reading of the screenshot is that that GTBELIB_INSTALL is actually set to point at C:\Users\cmayberry7\GitHub\gtbelib, rather than C:\Users\cmayberry7\Github\GTBE\gtbelib

  • Thanks for catching that Chester, as shown below I have corrected that mistake.

    Unfortunately that didn't help with the error.

    Regards,

    Curtis

  • Curtis Mayberry1 said:
    Thanks for catching that Chester, as shown below I have corrected that mistake.

    Unfortunately that didn't help with the error.

    Can you post the error from the CCS build console again, so can check that the correct include paths are being passed to the compiler.

    It might also be worth running Process Monitor during the failed compile, and use the File Summary filter to check which file(s) the compiler is trying to open.

  • I was able to solve this problem by importing my Build Variables into the workspace again and overwriting the current ones.  I also deleted the other gtbelib folder so there wasn't any confusion.

    I thought I had them set correctly, but I must have been missing one or more other changes that importing that file makes besides setting the build variables.

    Regards,

    Curtis

  • hi Chester,

    Can you elaborate on how you imported the variable to solve your issue?