When compiling a SYS/BIOS project, XDC is called (launched) to compile the SYS/BIOS configuration file. This is technically an external process, I know, but is there any way to access the project's build/environment variables? (${PROJECT_BUILD_DIR}, ${build_artifact}, etc.) It seems odd that CCSv4/CCSv5.1 does not inject them into the spawned task's environment like all other development IDE's do, so I am hoping that I am just getting stumped by some dumb error or oversight on my part.
I've tried walking the system's environment via java.lang.System.getenv() and the like, and I have also looked into importing the xdc.bld.BuildEnvironment module, but in the latter, the XDCtools help file does not really define a way to access the actual environment variables.
As a background, I need a way to statically configure SYS/BIOS (i.e., via the project's RTSC configuration file) based on whether it's a release build or a debug build. Not that I would want to maintain two separate files (definitely not!), but even that is not an option as CCS removes the option to "Exclude from Build" in the context menu for .cfg files.
Now, I have rewritten a function to parse the "user.dir" environment variable (i.e., environment["user.dir"]) to determine my build type based on the current build directory, and this works, but I would still like a cleaner approach by simply accessing the project's build variables. (For instance, there are other conditional flags I want to use other than simply release vs. debug.)
Is this possible, and if so, how?
