Multiple build configurations

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Multiple build configurations

ソリューションへジャンプ
1,475件の閲覧回数
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.

ラベル(1)
0 件の賞賛
返信
1 解決策
1,106件の閲覧回数
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 件の賞賛
返信
3 返答(返信)
1,106件の閲覧回数
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 件の賞賛
返信
1,107件の閲覧回数
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 件の賞賛
返信
1,106件の閲覧回数
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 件の賞賛
返信