Tool/software: Code Composer Studio
Is there a way to take a value defined in a C header (#define VERSION 0x1234) and automatically be able to use it as a Code Composer build variable?
Here is my situation: I have a version variable where I define the version of my source files such as define VERSION 201704101234ULL. I want to take this number (or a string if need be) and automatically name the .out file with the version number. I could manually enter the number in the project settings, by I am trying to make it as automated as possible to reduce the cases where they get out of sync. I have done the opposite by using build vars in my code, but in this case the version number is automatically generated into the .h file and I need to extract it to the build settings. I am also open to suggestions using a pre-build step and a .bat file, but in all cases I need a way to write a build variable to the project automatically.
Has anybody done this?