Multiple build configurations

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Multiple build configurations

Jump to solution
1,071 Views
dsherman
Contributor III

If I have sources which will build mutiple targets using different preprocessor defines which I've configured in the project settings, is there a nice way of either:

 

-Making multiple projects that use the same source files and project directory but have different settings

-or-

-Automating different builds through batch files that can provide the different combinations of #defines

 

I have source files that have dozens of possible build configurations, and it's a little tedious to have to edit the project settings to build each one.  I found that the preprocessor settings are stored in .cproject, but I can't tell what calls out that file.

Labels (1)
0 Kudos
1 Solution
702 Views
Rick_Li
NXP Employee
NXP Employee

Hi David Sherman,

in KDS IDE, you can do that by creating different configurations.

the way is as below:

1) launch your project in KDS, right click the project name to launch Properties, then, extend "C/C++ Build" and click "Environment"

2) in the right panel, click "Manage Configurations..." button to add a new configuration by click "New..." button in the launched window.

3) then you have more than one configurations, select one of the configuration.

4) click "Settings" which is also under "C/C++ build" of Properties of your project, then, in right panel, click "Preprocessor" under "Cross ARM C Compiler", add defined symbols (Macros)

5) then, you will have multiple targets by selecting different Macros.

Hope it helps!

View solution in original post

0 Kudos
3 Replies
702 Views
dsherman
Contributor III

Almost there!  As a test, I got it to build another configuration.  In the debug configuration, if I try to substitute ${config_name} in the path to the executable, I get an error saying:

Project name should be specified as variable argument for ${config_name} variable

Short of having to specify the path to the executable for each target, any idea why including the config_name variable doesn't work?

0 Kudos
703 Views
Rick_Li
NXP Employee
NXP Employee

Hi David Sherman,

in KDS IDE, you can do that by creating different configurations.

the way is as below:

1) launch your project in KDS, right click the project name to launch Properties, then, extend "C/C++ Build" and click "Environment"

2) in the right panel, click "Manage Configurations..." button to add a new configuration by click "New..." button in the launched window.

3) then you have more than one configurations, select one of the configuration.

4) click "Settings" which is also under "C/C++ build" of Properties of your project, then, in right panel, click "Preprocessor" under "Cross ARM C Compiler", add defined symbols (Macros)

5) then, you will have multiple targets by selecting different Macros.

Hope it helps!

0 Kudos
702 Views
dsherman
Contributor III

Yes, thank you!  That works perfectly!  Guess I didn't realize that new configurations can be added and have separate settings.  :smileyhappy:

0 Kudos