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/F28M36P63C2: Error #1965 - Cannot open source file "ti/drivers/UART.h"

Part Number: F28M36P63C2
Other Parts Discussed in Thread: SYSBIOS

Tool/software: Code Composer Studio

Why cannot the CCS compiler find a driver header file?

In one of my code files I include the following file:

#include <ti/drivers/UART.h>

If I Ctrl-Click on the file name CCS appropriately opens the file.  However when I go to compile it gives the #1965 error that it cannot find that file.

The include is automatically handled by the RTOS and expands to:

"C:/ti/tirtos_c2000_2_16_01_14/products/tidrivers_c2000_2_16_01_13/packages"

The full path of the file is:

"C:\ti\tirtos_c2000_2_16_01_14\products\tidrivers_c2000_2_16_01_13\packages\ti\drivers\UART.h"

If I expand out the tree under the includes I can locate the appropriate file as well.

  • Hi John,
    Can you provide the full build output from your build output console?

    Thanks
    ki
  • **** Build of configuration Release for project md.wdmp.M3 ****

    "C:\\ti\\ccs710\\ccsv7\\utils\\bin\\gmake" -k -j 8 all -O
    'Building file: ../taskUart.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccs710/ccsv7/tools/compiler/ti-cgt-arm_17.3.0.STS/bin/armcl" -mv7M3 --code_state=16 --float_support=vfplib -me -O4 --include_path="C:/ti/ccs710/ccsv7/tools/compiler/ti-cgt-arm_17.3.0.STS/include" --include_path="C:/Users/John Wolgemuth/workspace_v7_test/md.wdmp.M3" --include_path="C:/Users/John Wolgemuth/workspace_v7_test/ti.M3.includes" --include_path="C:/Users/John Wolgemuth/workspace_v7_test/ti.M3.driverlib" --include_path="C:/Users/John Wolgemuth/workspace_v7_test/md.wdmp.M3.board.A00389" --define=ccs -g --c99 --strict_ansi --gcc --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --ual --check_misra="1,2,3,4,5,-5.6,-5.7,6,7,8,-8.1,9,-9.3,10,-10.1,-10.2,-10.4,11,12,13,14,15,16,17,18,19,-19.4,20" --misra_advisory=remark --misra_required=warning --preproc_with_compile --preproc_dependency="taskUart.d" --cmd_file="C:/Users/John Wolgemuth/workspace_v7_test/md.wdmp.M3.RTOS/Release/configPkg/compiler.opt" "../taskUart.c"

    >> Compilation failure
    subdir_rules.mk:23: recipe for target 'taskUart.obj' failed
    "C:/ti/bios_6_46_02_47/packages/ti/sysbios/knl/Queue.h", line 395: warning #551-D: variable "lab" is used before its value is set
    "C:/ti/bios_6_46_02_47/packages/ti/sysbios/knl/Swi.h", line 579: warning #551-D: variable "lab" is used before its value is set
    "C:/ti/bios_6_46_02_47/packages/ti/sysbios/knl/Clock.h", line 595: warning #551-D: variable "lab" is used before its value is set
    "C:/ti/bios_6_46_02_47/packages/ti/sysbios/knl/Task.h", line 941: warning #551-D: variable "lab" is used before its value is set
    "../taskUart.c", line 28: fatal error #1965: cannot open source file "ti/drivers/UART.h"
    1 catastrophic error detected in the compilation of "../taskUart.c".
    Compilation terminated.
    gmake: *** [taskUart.obj] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****
  • I have also included the tree view and include options.

  • Thanks John. I believe what is happening is related to this known issue mentioned my Aarti in the below post:
    e2e.ti.com/.../601227

    Basically that include path that are "inherited" are not being passed to the build tools. This can be seen in the build output. Try explicitly adding the include search path in the build options

    Thanks
    ki
  • Thanks Ki. This solution provides a workaround for my.

    However, this looks like a bug to me (or at least incomplete implementation of a feature.) Is there a place to submit CCS related bugs to TI?
  • John Wolgemuth68 said:
    or at least incomplete implementation of a feature

    Yes, you are right. Long story short, it was a planned new behavior that was eventually decided that it was not needed... for now. At the very least it is confusing. I'll need to follow up on what the future plans for this is.

    Yes, the forum is the right place to report all bugs.

    Thanks

    ki

  • So this resolved the header issue but now I get:

    undefined first referenced                                                                                                

     symbol       in file                                                                                                      

    --------- ----------------                                                                                                

    GPIO_init C:/Users/.../workspace_v7_test/md.wdmp.M3.board.A00389/Release/md.wdmp.M3.board.A00389.lib<pinout.obj>

    UART_init C:/Users/.../workspace_v7_test/md.wdmp.M3.board.A00389/Release/md.wdmp.M3.board.A00389.lib<pinout.obj>

    error #10234-D: unresolved symbols remain

    error #10010: errors encountered during linking; "md.wdmp.M3.out" not built

    >> Compilation failure

    makefile:157: recipe for target 'md.wdmp.M3.out' failed

    gmake[1]: *** [md.wdmp.M3.out] Error 1

    gmake[1]: Target 'secondary-outputs' not remade because of errors.

    makefile:146: recipe for target 'all' failed

    gmake: *** [all] Error 2

    **** Build Finished ****

    How can I associate the C files that are in the driver libraries?

  • You just need to make sure you add the driver library to the project. You can add it directly to the project or make a reference to it via Project Properties (Build -> Linker -> File Search Path )