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.

Any Easy way to Add include directories

Guru 20025 points

Hello,

I am using CCS 5.3. 

Is there any way to easily add a directory to to the include search path, i.e. right click on the directory and it's added to the include search list?

I am creating alot of unit test case projects and I am having to create a include search list each time, which waist a lot of time.

Stephen

  • Hi Stephen,

    does this wiki cover what you need?

    http://processors.wiki.ti.com/index.php/Include_paths_and_options

    Best Regards,
    Lisa

  • Hello Lisa,

    Sorry for taking so long to reply.  As far as I can see that wiki only shows how to add include files using the normal interface.  It doesn't give any way to easily add files to the include list.

    Stephen

  • Hi Stephen,

    ah, are you using the command line?  I appologize if this slipped.  I do not believe there is any easier way but I will double check for you.

    Best Regards,
    Lisa

  • Stephen,

    stevenh said:
    I am creating alot of unit test case projects and I am having to create a include search list each time, which waist a lot of time.

    If all the projects are using the same paths, perhaps you can have them reference an options file which has all your include paths. I've seen this technique used in cases where people want to easily maintain build options shared among many projects

    Thanks

    ki

  • Hello Lisa,

    I'm using the IDE.  You're right, I don't think it's possible in the IDE.

    Stephen

     

  • Hello Ki,

    How do I specifiy an options file in the IDE?

    Stephen

  • stevenh said:
    How do I specifiy an options file in the IDE?

    You can do it in the build properties:

  • Hello Ki-Soo,

    I'm back on this issue again:)

    What's the format of the command file?  I searched the help and I could only find help on Linker Command files and not Compilier command files.

    Stephen

  • Ok.

    I put all of the compiler include directives (i.e. --include = ) in ordinary text file) and added it as a command file.  I also removed all the includes from the include options property page.

    The project seems to build without any errors, so I'm assuming using this is the correct way to use the compiler command file.

    Stephen

  • Another question on this same issue.

    I previously specified the include file using a variable, i.e. "${SOURCE_DIRECTORY}/Source/include".

    How can I do the same in the compiler command file?

    Stephen

  • stevenh said:

    I put all of the compiler include directives (i.e. --include = ) in ordinary text file) and added it as a command file.  I also removed all the includes from the include options property page.

    The project seems to build without any errors, so I'm assuming using this is the correct way to use the compiler command file.

    Yup, exactly. Basically the contents of the file is passed as additional options to the compiler. So you use the same syntax as you would pass options to the compiler

  • stevenh said:

    I previously specified the include file using a variable, i.e. "${SOURCE_DIRECTORY}/Source/include".

    How can I do the same in the compiler command file?

    Such build variables are not supported in options files. This is because the build variables are specific to CCS project manager and options files are blindly passed to the compiler without variable expansion. Options files do not support variables of any kind. Sorry.

    Thanks

    ki

  • Hello Ki,

    Thanks for the reply.

    Then I'll just keep a text file with ALL the include directories and copy and past them into the include options window.  If the compile time gets too long (which it shouldn't since I'm creating indivdual unit test projects), I'll just remove some of the ones that are not needed.

    Thanks,

    Stephen