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/CODECOMPOSER: Help setting Project Setting to include the CSL directory

Part Number: CODECOMPOSER


Tool/software: Code Composer Studio

Hello, I'm a newbie at programming in Code Composer so this is probably a simple question for most members. I've been looking over the Chip Support Library documentation and there are a lot of very useful functions. I've tried implementing a simple program to toggle a GPIO pin but when I try to include:

#include <ti/drv/gpio/GPIO.h>
#include <ti/csl/csl_tmr.h>

The compiler throws and error saying files or directories not found. I have installed the Processor Software Development Kit and I see a pdk_k2h2_4_0_14\packages\ti\drv and a csl directory. So just need help in configuring
Code Composer so that it will see these directories.

Thank you very much,
Joe

workspace_v9.zip

  • Which CCS, SDK, compiler, etc. versions?

    Please, post a full console log. 

  • Hi Tom,

    Here is the output on the console window:


    **** Build of configuration Debug for project test ****

    "C:\\ti\\ccs901\\ccs\\utils\\bin\\gmake" -k -j 12 all -O

    Building file: "../main.c"
    Invoking: GNU Compiler
    "C:/ti/ccs901/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-a15 -mtune=cortex-a15 -marm -mfloat-abi=hard -I"H:/Projects/Working/CLC/CodeComposer/Working/workspace_v9/test" -I"C:/ti/pdk_k2hk_4_0_14/packages/ti/csl" -I"C:/ti/pdk_k2hk_4_0_14/packages/ti/csl/src" -I"C:/ti/ccs901/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/arm-none-eabi/include" -Og -g -gdwarf-3 -gstrict-dwarf -Wall -specs="nosys.specs" -MMD -MP -MF"main.d" -MT"main.o" -o"main.o" "../main.c"
    subdir_rules.mk:9: recipe for target 'main.o' failed
    ../main.c:2:10: fatal error: ti/csl/csl_tmr.h: No such file or directory
    #include <ti/csl/csl_tmr.h>
    ^~~~~~~~~~~~~~~~~~
    compilation terminated.
    gmake: *** [main.o] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****

    **** Build of configuration Debug for project test ****
    
    "C:\\ti\\ccs901\\ccs\\utils\\bin\\gmake" -k -j 12 all -O 
     
    Building file: "../main.c"
    Invoking: GNU Compiler
    "C:/ti/ccs901/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin/arm-none-eabi-gcc.exe" -c -mcpu=cortex-a15 -mtune=cortex-a15 -marm -mfloat-abi=hard -I"H:/Projects/Working/CLC/CodeComposer/Working/workspace_v9/test" -I"C:/ti/pdk_k2hk_4_0_14/packages/ti/csl" -I"C:/ti/pdk_k2hk_4_0_14/packages/ti/csl/src" -I"C:/ti/ccs901/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/arm-none-eabi/include" -Og -g -gdwarf-3 -gstrict-dwarf -Wall -specs="nosys.specs" -MMD -MP -MF"main.d" -MT"main.o"   -o"main.o" "../main.c"
    subdir_rules.mk:9: recipe for target 'main.o' failed
    ../main.c:2:10: fatal error: ti/csl/csl_tmr.h: No such file or directory
     #include <ti/csl/csl_tmr.h>
              ^~~~~~~~~~~~~~~~~~
    compilation terminated.
    gmake: *** [main.o] Error 1
    gmake: Target 'all' not remade because of errors.
    
    **** Build Finished ****
    

    Thank you very much for helping me.

    Joe

  • Tom,

    HI, here is a screen shot of the Project Properties Directories. I included the csl directory.

    Perhaps I don't have the right order or need to include another directory?

    Quick question for you. I downloaded the PROCESSOR-SDK-RTOS-K2HK and ran the .exe to install the libraries and executable. Do I need to do anything else? I don't think I need to run the command, 

    C:\ti\processor_sdk_rtos_[soc]_[version]> setupenv.bat

    Thank you very much,
    Joe

  • Tom,

    HI, I included the path to the c:\ti\pdk_k2hk_4_0_14\packages directory and was able to fully compile without any errors.

    Always something simple.

    Thank you very much,

    Joe

  • Glad you did.