- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Solved! Go to Solution.
- Labels:
-
Debug
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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