Does WICED SMART IDE support build time and date?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I have ever used IAR compiler which can create bin/hex file after compile and linking, the output bin/hex file contain strings about compile time and date.

I am using WICED SMART IDE, I want to know that whether its compiler support this feature? Is there any key word for that?

0 Likes
1 Solution
asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA

Have you tried something like this?

const char const* build_date = __DATE__;

const char const* built_time = __TIME__;

Date and time macros should also be available with GCC (which is what is used by this IDE).

View solution in original post

2 Replies
asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA

Have you tried something like this?

const char const* build_date = __DATE__;

const char const* built_time = __TIME__;

Date and time macros should also be available with GCC (which is what is used by this IDE).

Anonymous
Not applicable

kai.ren,

Once you put this into your code you have to also make sure to change the modification date of the file containing it to make sure to rebuild it whenever you start a build. (Make clean would be another option, but then why do we have incemental builds). Under Windows there is a command like the following to achieve that

copy /b version.c+,,

but I'm wondering now how I can use it in my project. Specifically I would like to know whether there is a way to use makefile.mk or something else to execute the above command before every build.

I hope you can help.

Regards,

Kilian