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/CC1352P: Adding a folder to build doesn't work

Part Number: CC1352P

Tool/software: Code Composer Studio

Code composer question:

I have a bunch of *.c, *.h files I'd like to add to the CCS build. I'd like to create a Folder linked to another folder somewhere else.

I draged and dropped a folder onto the project and told the UI to link it to another folder. I tried building and failed because it could not find the header files required by some other C files.

I basically followed the instructions per link. How do I add a folder that is LINKED not copied and doesn't fail to build because it doesn't seem to use the linked folder.

Is this even possible?

  • Yes you can link a folder to a project. If the build is failing with the error that it cannot find a header file, please check which header file is being reported in the error message and verify that the path to the header file is provided to the compiler's include path option.
    http://processors.wiki.ti.com/index.php/Compiler/diagnostic_messages/5

  • I noticed that when I create a linked folder it creates it in PROJECT_ROOT/default, not in the expected PROJECT_ROOT folder.

    Also there is no header link files in the folder only subdir_vars.mk and subdir_rules.mk

    Is this expected?

  • I'm not quite sure I understand. Can you let me know step by step your process for creating the project and linking the folder, and where you think it is going wrong? Please also include screenshots as that will help us better understand the issue. Thanks.

  • I can't seem to add pictures to the forum for some reason

    1) Right click the project

    2) Select New -> Folder

    3) Set folder name

    4) Click Advanced and choose Link to alternate location (Linked Folder)

    5) In the field use that specifies folder location type ../some_folder Which is a folder one level above where the project is

    This folder has c files and h files I'd like to include in the build

    6) Click Finish

    Observation 1) Folder is created in project view with a little arrow and inside are the c files and h files

    Observation 2)  If I try to re-build it fails to find the header file even though I see the files in the project view (Cannot open source file)

    Then I tried adding that linked folder to the Include Options

    ${PROJECT_ROOT}/some_folder

    Observation 3) Even though I added the Linked folder it still can't find the header file that is actually located in ../some_folder

    Observation 4) The build only finds the header if I added ${PROJECT_LOC}/../some_folder

    Ideally, I should just point to the Linked folder and it should find the linked resource. I'm not sure the purpose of the Linked folder is you can't include it in the list of Include Options

     



  • Yvan Pearson said:
    Observation 1) Folder is created in project view with a little arrow and inside are the c files and h files

    Yes, the arrow indicates it is a linked folder.

    Yvan Pearson said:
    Observation 2)  If I try to re-build it fails to find the header file even though I see the files in the project view (Cannot open source file)

    For the C source file on which the error is reported, is the source file in the same folder as the header file (ie both are in some_folder) or is the source file in the main project folder while the header file is in some_folder? And does the #include directive enclose the header file name within double quotes or angle brackets? All of this determines the order in which compiler will search directories for the header file. Please see section 2.5.2 of the ARM Compiler Users Guide for more details.

    Yvan Pearson said:
    Observation 4) The build only finds the header if I added ${PROJECT_LOC}/../some_folder

    That is the correct path to add because that is the actual resolved path where the header file physically resides.