Here is my requirement: 1) In options->c/c++->define, define VARIABLE1. 2) In options->output->Name of executable = VARIABLE1_FW 3) Select "Create Batch File"
Build this and it will create VARIABLE1_FW.bat
1) In options->c/c++->define, define VARIABLE2. 2) In options->output->Name of executable = VARIABLE2_FW 3) Select "Create Batch File"
Build this and it will create VARIABLE2_FW.bat
Now the problem is the batch file will point to __i files and inside those __i file contains the details of last compiled project settings. For eg: in the above example, the __i file contains "-DVARiABLE2" since it's the last compiled project.
so if I run VARIABLE1_FW.bat, it is actually building the project with definition "VARIABLE2" as __i contains -DVARIABLE2.
Is there any way to batch files without these intermediate __i files? or else Is there a way to create multiple batch files with different project settings.
Basically I want to create two axf files with different definitions via batch files.
Thanks in advance for your help.
Is there any way to batch files without these intermediate __i files?
You can set up multiple target configurations in the IDE (Project->Manage->Components...->Project Components), build them in separate target directories, (Project->Options for Target...->Output->Select Folder...), then have the IDE generate batch files. The batch files along with all the option files go into the target directory, so you'll have separate ones.
OTOH, you may just be better off not using the IDE at all. Those batch files aren't really that hard to write by hand. Or you could use the classic tool for the job: Makefiles.
Thanks for the solution. That's an easy fix. Never thought about that :). Rightnow I need a quick fix. I will write my own batch will in future.