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 5.5 include folder with all its subfolder as "search path"

Other Parts Discussed in Thread: SYSBIOS

Hello everybody,

I am working on a particular project that required to make a heavy customization of the Chip Support Library for the c5517 DSP in CCS 5.5.

To keep track of all the modifications I reorganized the CSL in subfolders, each one dedicated to a single peripheral. Each dedicated subfolder contains my customised functions' .c file, the header and the register structure definition header relative to the specific peripheral (cslr_xxx.h)

All these subfolders are placed in a parent folder called "custom CSL" which is inside the project folder itself.

Example:

Project_folder/Custom CSL/Custom PLL/Custom_pll.c

Project_folder/Custom CSL/Custom PLL/Custom_pll.h

Project_folder/Custom CSL/Custom PLL/cslr_pll.h

I would like to add just the folder "Custom CSL" to the search paths of the linker and have all the subdirectories included as well. When I do, though, the build is not successful because the linker doesn't find the files contained in the subfolders.

Is there a workaround to this situation? It is very important for me to keep this folder/sub-folder structure. Including every single subfolder would definitely be a sub-optimal solution.

Thank you in advance for your help

  • Hi Vittorio,

    Did you try adding the same here too:

    Compiler -> Include Options

    Regards,
    Gautam
  • Thanks for the quick answer, yes I did, the path of the parent folder was added both to the Linker and the Compiler include options (sorry for not mentioning it).

    If I just put all the files as they are in the parent folder (without wrapping them in rationalized subfolders) I can build the project just fine. When, though, I try to place the files in subfolders, the compiler returns errors like "could not open the source file "xxx.h"" and aborts the compilation.

    This unless I manually add every subfolder path to the compiler include options, which I would rather not do, as you can clearly imagine.

    My need is basically to have the files relative to every peripheral, wrapped in a graphically friendly block. In fact, this is a custom library, and functions may need to be debugged often. The idea behind this folder-subfolder structure would be that, when a debugged version of a function is ready (including headers), it can be distributed easily to all others in the company. This way, who gets the new library module can just overwrite the function folder, without having to put every file in the right directory.
  • Hi,

    Vittorio Pascucci said:
    I manually add every subfolder path to the compiler include options

    In one way or another, you will have to explicitly pass the complete paths to the compiler/linker. However, you can try a few things:

    - Add each include subdirectory directly to the compiler/linker include options;

    - Add just the master include subdirectory (./Custom CSL) to the compiler/linker options and change the #include directives to point to the subpaths of each include file (similar to what SYSBIOS does):

    #include <Custom PLL/Custom_pll.c>

    - Create a compiler command file (a plain text file) that contains all the include parameters and subdirectories. Something similar to what I mention in the post below:

    http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/397710/1407607#1407607

    Hope this helps,

    Rafael

  • Great! very simple, elegant and flexible solution, thank you very much!