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.

Projectspec multiple build configurations

Other Parts Discussed in Thread: CCSTUDIO, TM4C123GH6PM

Hi there,

I have referenced  and

, and the schema file found at C:\ti\ccsv6\eclipse\plugins\com.ti.ccstudio.project.templates_6.1.1.201508201800\schema

However, I am note sure if i can use project specs for my targeted use case:

  • support multiple build configurations
  • support including some files in a single build config but not another
  • support different include paths and compiler defines

Is this possible using a project spec file? If so, what is the syntax for stating that some options belong to one config and others belong to a different config.

  • Sean2 said:

    However, I am note sure if i can use project specs for my targeted use case:

    • support multiple build configurations
    • support including some files in a single build config but not another
    • support different include paths and compiler defines

    You can certainly create multiple build configurations of a project using projectspecs (using syntax similar to below), however I don't think it is possible to customize the files and options for a specific build config and not the other. If I find something different I will let you know.

    <projectSpec>
     <project
       title="MyExample"
      device="Tiva TM4C123GH6PM"
      configurations="BuildConfig1,BuildConfig2"
      <file action="copy" path="main.c" targetDirectory="." />
     </project>
    </projectSpec>

  • Hi,

    Thanks for your response. This was my guess as suspicion, just wanted to confirm. So if I wanted to have the same project that works on two different board files. then I would need to create a projectspec file for board since adding build config specifics is not currently possible.

  • Sean2 said:
    So if I wanted to have the same project that works on two different board files. then I would need to create a projectspec file for board since adding build config specifics is not currently possible.

    Yes that seems to be the way to go.

  • FYI - this support has been implemented for the upcoming CCS v6.2.0:

    Added ability to specify, per build-configuration:
    1. Files to exclude from build.
    2. Compiler/Linker/Hex tool build option settings.
    3. Enablement of the Hex tool.
    4. Pre/Post build steps.
    
    To address #1, the <file> element now has a new "applicableConfigurations" attribute.  The new attribute accepts a comma-separated list of build-configuration names.  The file will be included in build only for the specified build-configurations (i.e. it will be excluded from build for all other build-configurations).
    
    To address the remaining capabilities, a new <configuration> element has been added to the <project> element.  Multiple <configuration> elements can be specified.  Each <configuration> element will specify the build-configuration name, and can optionally specify the compiler/linker/hex tool option settings, enablement of the hex tool, and pre/post build steps.
    
    The projectspec schema has been updated with the changes [<ccs>/ccsv6/eclipse/plugins/com.ti.ccstudio.project.templates_x.x.x/schema/projectSpec.xsd].

    Thanks,

    - Baltasar

  • Hello. This looks like a step in the right direction. To clarify...is it still not possible to use different compiler defines for each build configuration?
  • Never mind i figured it out!

    Thanks for adding this!!