I defined some Environment Variables in the C/C++ Build tab of my DS 5.3.1 Project Properties window.
For example:
ENVIRONMENT_VAR_HW_BOARD = “mangoh_green”
LEGATO_TARGET=wp76
or
ENVIRONMENT_VAR_HW_BOARD = “company_board”
LEGATO_TARGET=wp8548
I would like to have different executable names for my builds, depending on the used values of my environment variables.
you certainly can use variables to have some dynamic behavior in your Xdef files. Variables are contributed either from the environment, or from an sdef buildVars section.
You just need to have something like:
I understand your explanation, but, I can’t find the exact syntax to concatenate the environment variable to the name of my application.
The compiler complains about the $ symbol.
I already tried some other tricks and other character symbols, but, nothing compiles.
I didn’t find any examples in the documentation.
Currently environment variables are only allowed in command-line arguments and file paths. I don’t know why this decision was made initially. If I remember correctly we have an open feature request to allow variables in all values, but it hasn’t been implemented yet.