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/CCSTUDIO-TM4X: CCSTUDIO-TM4X

Part Number: CCSTUDIO-TM4X

Tool/software: Code Composer Studio

I am new to CCS, and I get the error message which I can not solve:

#1965 cannot open source file "inc/hw_gpio.h" 

even though the proper include path is added.  Here's what the console says:


**** Build of configuration Debug for project Gyakorlo ****

"C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
'Building file: ../gpio.c'
'Invoking: ARM Compiler'
"C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -Ooff --include_path="C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/include" --include_path="C:/ti/TivaWare_C_Series-2.1.3.156/inc" --include_path="C:/ti/TivaWare_C_Series-2.1.3.156/driverlib" -g --gcc --define=ccs="ccs" --define=PART_TM4C123GH6PM --diag_wrap=off --diag_warning=225 --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="gpio.d" "../gpio.c"

>> Compilation failure
subdir_rules.mk:7: recipe for target 'gpio.obj' failed
"../gpio.c", line 49: fatal error #1965: cannot open source file "inc/hw_gpio.h"
1 catastrophic error detected in the compilation of "../gpio.c".
Compilation terminated.
gmake: *** [gpio.obj] Error 1
gmake: Target 'all' not remade because of errors.

**** Build Finished ****

Can anybody help me?

  • Tanyi,

    Based on the error message I would assume that the gpio.c file has a #include "inc/hw_gpio" line.  This means that the compiler will look in any of the specified include paths with /inc appended on the end.  Looping at the include paths in the build output I can see the location of this file specified.

    C:\ti\TivaWare_C_Series-2.1.3.156\inc

    However since the #include has /inc in it already you would need to have the following in your search path

    C:\ti\TivaWare_C_Series-2.1.3.156

    To add this path right click on your project in the project explorer.  Select properties.  Under the compiler select include paths.  Then add the path.

    Regards,

    John

  • That was the problem. Thank you very much indeed!

  • No problem. Glad that did the trick.

    John