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: Managing files in a build configuration

Other Parts Discussed in Thread: CC2640R2F

Hi Experts,

Good day. We received queries which involved CCS IDE environment and would like to ask your support. Below is the full query from client:

"I need help understanding the best way to setup a Code Composer Studio project to have multiple build outputs.  We have an application which supports both the CC2640F128 and the CC2640R2F.  The same code base is built for both targets, and we manage the differences between these two build targets as a device specific files.

In the project, we created four Configurations:

CC2640F128 Debug
CC2640F128 Release
CC2640R2F Debug
CC2640R2F Release
We have, tediously, set the include paths and options for each of these build configurations using the Code Composer Studio 10.4.0.00006 IDE.  The target specific files are selected by setting "exclude from build" options on the files and directories we wish to exclude.

Question #1 - Are multiple build configurations the best way to manage multiple targets from the same code base?

Multiple configurations in the same .cproject seems to give us what we am looking for, but we have not found a good way to review all of the settings in each build configuration and it seems like we might have a maintainability issue later.  Example: if we need to add an include path to all four configurations, it is difficult to confirm that the include path was added correctly.

Question #2 - Is there a "white list" approach to adding files to a project?

Files are automatically included in the project, and the IDE forces me to mark them as "exclude from build" when we do not want them.  This causes us difficulty when we add files to a common library and do not expect them to be picked up automatically.  Is it possible to disable the feature that automatically includes files in a project if they exist in the directory?"

Any thoughts on these?

Thank you for your guidance.

Regards,
Archie A.

  • Hello,

    Question #1 - Are multiple build configurations the best way to manage multiple targets from the same code base?

    Multiple configurations in the same .cproject seems to give us what we am looking for, but we have not found a good way to review all of the settings in each build configuration and it seems like we might have a maintainability issue later.  Example: if we need to add an include path to all four configurations, it is difficult to confirm that the include path was added correctly.

    While it is more common to have separate projects for each device variant, it is not uncommon for project build configurations to also be used in the way the customer is using it. Agreed that it can be tedious to maintain build options across multiple build configurations. One trick that I recommend is to put all commonly shared build options into a build command file that is included by all the build configurations. That way, if there are build options that you want to change for all the build configurations, you only need to modify the one file.

    For more information of build command files, see section 2.3.2 of the Compiler User's Guide for more information on the --cmd_file option:

    https://dev.ti.com/tirex/explore/node?node=AHmMY6TEqqPycCEOnkvrqg__FUz-xrs__LATEST

    Question #2 - Is there a "white list" approach to adding files to a project?

    Files are automatically included in the project, and the IDE forces me to mark them as "exclude from build" when we do not want them.  This causes us difficulty when we add files to a common library and do not expect them to be picked up automatically.  Is it possible to disable the feature that automatically includes files in a project if they exist in the directory?"

    Note that you can also exclude whole folders (physical and virtual) from the build. Any files added to the folders would be automatically excluded from the build.

    Thanks

    ki