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.

TMS570LC4357: Detecting CCS Active Build Configuration

Part Number: TMS570LC4357

Hi,

I'm trying to detect the active build configuration of a CCS project from an external application (without opening CCS).

I know that build configurations are defined in the .cproject file, but I couldn't find where the user's preference for which configuration is set as active is stored. Where exactly is this preference information kept?

My CCS version is 12.4.0.

Thank you.

  • Hello Ceyhun,

    The active build configuration preference in CCS is stored in the .cproject file located in your project's root directory.

    To detect the active configuration from an external application:

    1. Parse the .cproject XML file
    2. Locate the <storageModule moduleId="org.eclipse.cdt.core.settings"> element
    3. The first <cconfiguration> entry listed within this storage module represents the active build configuration
    4. Extract the "name" attribute from this configuration to identify whether it is Debug, Release, or another custom configuration

    Example XML structure:

    <storageModule moduleId="org.eclipse.cdt.core.settings" version="4.0.0">
        <cconfiguration id="org.eclipse.cdt.managedbuilder.core.cfg.<config-id>">
            <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider"
                          id="org.eclipse.cdt.managedbuilder.core.cfg.<config-id>"
                          moduleId="org.eclipse.cdt.core.settings"
                          name="Debug">
                ...
            </storageModule>
        </cconfiguration>
    </storageModule>

    Note that CCS also stores workspace-level preferences in <workspace>/.metadata/.plugins/org.eclipse.cdt.core/, but the .cproject file is the definitive source for build configuration information.

    If you need to programmatically change the active configuration, you can reorder the <cconfiguration> elements in the XML file.

    Let me know if you need any additional clarification.

    Best Regards,
    Zackary Fleenor