Search code examples
ideembeddediarbuildconfigurationbuildconfig

In IAR v8.11, is there a predefined variable name for build configuration?


I am using IAR V 8.11.

I am currently using the build configuration to build for different platforms. I want to be able to output the files that are generated from the build process into directories that are labelled with the build configuration name.

In order to do this, I need a variable name that has stores the build configuration, and use this variable name in the various project settings.

IAR (the IDE) provides access to custom argument variables via Tools->Configure Custom Argument Variables, but I was hoping there was a predefined variable already allocated for build configuration name.

So if I have several build configurations, Platform1, Platform2, it automatically updates the value of $VARIABLE_NAME$.


Solution

  • The best way to do this is to use the $CONFIG_NAME$ variable that is already available.

    The value assigned to $CONFIG_NAME$ is the name of the build configuration, which is exactly what I wanted.