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.
已解决! 转到解答。
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!
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?
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!