Overview
It is possible to have multiple SysConfig files in a Code Composer Studio (CCS) project. There are different use scenarios for this. One is if you have different SysConfig files for configuring different items and the files are independent. Another scenario is where you have a project that supports multiple boards and there are different SysConfig files for each board. In this case the files are mutually exclusive. This document focuses on the second scenario.
Supporting this scenario is accomplished by leveraging the ability to include/exclude source files on a per build configuration basis. As far as the build system is concerned .syscfg files are source files.
Procedure
Create a build configuration
The general idea is that you have a SysConfig file per build configuration. You can then specify the file to use for each configuration. If you already have multiple configurations you can skip this step.
- Right-click on the project and select Build Configurations -> Manage...
- This will open a dialog box to manage build configurations and will list the existing configurations in the project.
- Click the New... button to create a new build configuration. Give this configuration a name such as Board2. Optionally you can also provide a description.Select the existing build configuraiton that you want to copy the settings from.
Warning:
It is not recommended to have spaces in the name of the configuration.
- Once you click OK it will show the new configuration in the manage configurations dialog.
- Click OK again to go back to the project.
Replicate your SysConfig file
The next step is to create a copy of the SysConfig configuration file (.syscfg).
- Right-click on the .syscfg file in Project Explorer and select Copy.
- Right-click on the project and select Paste.
- This will open a dialog box that prompts for a name for the new file. Enter a name.
- Both files will now be in the project and it will have automatically excluded the old file from both build configurations.
Specify SysConfig file to use for each configuration
It is now necessary to specify which SysConfig file to use for each build configuration.
- To enable the original file for the current build configuration right-click on it and select Exclude from build. As this is already set it will clear the status.
Both Files will now be enabled.
- Right-click on the second file and select Exclude from build so that is it not used for this build configuration.
- Now for the first configuration the original SysConfig file is included and the new one is excluded.
- Change the active build configuration to the other build configuration by right-clicking on the project and selecting Build Configurations -> Set Active -> Board2
- Confirm that the correct file is excluded and if not follow the same procedure to adjust it.
Now when build configuration Board1 is built it will use developmentboard.syscfg and when Board2 is built it will use productionboard.syscfg.