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
Make a post-build step that invokes gcc or some other Windows command-line compiler on your pc. Have a tiny source file include your header file, and based on the symbol values copy or move the bin file generated by the linker to a version-named file.