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

Before build execution failde

Hi all,

I created one small tool to generate FW_build_info.h file with following content:

#ifndef BUILD_Info

#define BUILD 1
#define BUILD_Date 24.10.2016
#define BUILD_Time 14:11:02

#endif

I wrote this code in C# using VS2015. Program works normally as far as it is executed directly from windows explorer or command prompt, but when I put it to uVision as Before Build command it wont work at all.

In Build Output there is log for it

Before Build - User command #1: FW_Build_Info.exe

but no FW_build_info.h was created.

Thanks for your help.

Regards

Martin

Parents
  • Not sure about why your build step failed.

    But shouldn't your file look like:

    #ifndef BUILD_Info
    
    #define BUILD 1
    #define BUILD_Date "24.10.2016"
    #define BUILD_Time "14:11:02"
    
    #endif
    

    Or how did you plan to actually use the BUILD_Date and BUILD_Time symbols, since the final result has to expand into something that is valid C/C++ which most probably then would be a string.

    And if you now or in the future target an international market, you might consider switching the date format to "2016-10-24" - in a number of countries, there will be a huge confusion if your date format has days or months first.

Reply
  • Not sure about why your build step failed.

    But shouldn't your file look like:

    #ifndef BUILD_Info
    
    #define BUILD 1
    #define BUILD_Date "24.10.2016"
    #define BUILD_Time "14:11:02"
    
    #endif
    

    Or how did you plan to actually use the BUILD_Date and BUILD_Time symbols, since the final result has to expand into something that is valid C/C++ which most probably then would be a string.

    And if you now or in the future target an international market, you might consider switching the date format to "2016-10-24" - in a number of countries, there will be a huge confusion if your date format has days or months first.

Children