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.

extending #include search path with CCS 5.2

Hi!

I'm trying to use a project-level variable to extend the #include search path of my project. I'm using CCS v5.2.1 and the C6000 compiler. I have a subfolder under my project folder, named '20s', as well as several other subfolders. Each subfolder contains a file, 'constants.h', storing different values. I want to make a few different builds with different constants, without changing my source code. So, I need to change my project's include path so the .c files can find the right version of 'constants.h'.

You can see how I'm attempting to add a new search path here:

The video (~9:30) at the bottom of this page confirms my syntax [ "${PROJECT_LOC}/20s" ] is correct:
http://processors.wiki.ti.com/index.php/Include_paths_and_options

The console shows the compiler output. It contains:

'Building file: ../STI.c'
'Invoking: C6000 Compiler'
"C:/ti/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6700 -g --include_path="C:/ti/ccsv5/tools/compiler/c6000_7.3.4/include" --include_path="/20s" --display_error_number --diag_warning=225 --abi=coffabi --preproc_with_compile --preproc_dependency="STI.pp"  "../STI.c"
"..\STI.h", line 23: fatal error #5: could not open source file "constants.h"

Above, I have highlighted the part of the compiler output that I believe I have affected. Unfortunately, this include_path does not help the compiler find the header file, constants.h.

My folder structure is:

  1. workspace
    1. project
      1. STI.c
      2. STI.h
      3. Debug
      4. Release
      5. 20s
        1. constants.h
      6. 50s
        1. constants.h

Is it possible to use project-variables with CCS v5.2.1 to extend the #include search path?

Thanks!

  • I was able to fix it. Apparently, the target build folder is the folder that all paths must be referenced to. This is different than what I am used to.

    In this case, my target folder is project/Debug. So the path must be "../subfolder" ("../20s" in my example). I have no idea if the project-variable, ${PROJECT_LOC} is useful.

    This item can be closed. Thanks.