This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

uV4: Including a preprocessor define in the file name

Hello All,

I have a question about a possibility to use symbols defined with #define in the C-code in the "Run User Programs After Build/Rebuild" dialog in "User" tab in "Target Options" in Keil uVision 4.

Let's assume I have in my code something like this:

/* * firmware version */
#define MAIN_MAJ_VERSION 2
#define MAIN_MIN_VERSION 0
#define MAIN_DEV_VERSION 18

Is it possible to get a file name like FW_V_MAIN_MAJ_VERSION_MAIN_MIN_VERSION_MAIN_DEV_VERSION.bin automatically, i.e. is it possible to use the preprocessor definitions? In this case the result name should be FW_V_2_0_18.bin

Thank you for your help,
Maciej