[Icc-mot] Build/Link time

Lance B. Smith lance at rapidware.com
Sat May 26 10:58:32 PDT 2007


One other thought on all of this. I purposefully DON'T want date / time
embedded. When it was built is irrelevant because of the magic of S-records.
What matters is that I can diff the S-record and get verification that what
I just built is still the same as the release build. The release S-record
has its own OS file date and time. It also has unique version number which
is embedded. If I embed the date time, then that will make it not diff clean
and I would have to know to ignore that difference and not others, which is
an error-prone hassle. 

This is very useful because I can go on writing new stuff conditionally and
test it carefully in a special test build turning on new code here and there
until I know it is ready for prime-time, but can quickly revert back to the
last release, by turning off the new conditional (#define) switches.
Furthermore, I may have to release another variant of the same base-project
during the new-coding phase. So, for example if two variants still build to
match the same two respective release S-record files, then I know the third
one will also represent the same level of testing, except of course for the
variation. (We do a lot of testing on our releases, and are fortunate to
have a very talented tester who can find the whackiest subtle bugs).

This allows me to keep incrementing the same source-control project and not
have so many versions of individual files to keep track of. And also allows
me to quickly fix any bugs that may come up during testing after the code is
handed off. Every hand-off gets unique suffix, that's the release control.
To avoid having too many suffixes go out the door, all test suffixes are
lower case. The final release suffix is upper case. The final S-rec must
diff clean against the latest test suffix, except for the one variation in
the suffix character.

Just some thoughts.

Best to all
-- Lance

=====================
Lance B. Smith, President
Rapidware, Inc.
108 East Main Street
Milan, MI 48160
734 439 3990
734 439 3975 Fax
lance at rapidware.com
www.rapidware.com
=====================


-----Original Message-----
From: icc-mot-bounces at imagecraft.com [mailto:icc-mot-bounces at imagecraft.com]
On Behalf Of John Baraclough
Sent: Saturday, May 26, 2007 1:25 PM
To: Discussion List for ICC08/11/12/16 users. You do NOT need to subscribe
toicc-announce if you are a member of this.
Subject: Re: [Icc-mot] Build/Link time

Hi Barry,

Just put the __DATE__ & __TIME__ macros into a very small file as 
below then delete the '.o' file after every build.

HTH

John

/* ************************************************************************
*\
   File: DateAndTime.c

   Purpose: Creates a string containing the compilation date & time.

   Revisions:
   1.00 JNB 2006-10-18

   Notes: The intermediate file 'DateAndTime.o' is deleted after every
          compilation, so that it is recompiled each time with the new date
          and time.

\* ************************************************************************
*/

#include <includes.h>

void GetCompileDateAndTime(void)
{
   cstrcpy(MessageOut, "Build - ");
   cstrcat(MessageOut, __DATE__);
   cstrcat(MessageOut, " \100 ");
   cstrcat(MessageOut, __TIME__);
}






At 22:10 25/05/2007, you wrote:
>I want to keep a string that indicates the date and time that the 
>firmware was built.
>
>Right now, I'm building a string with __DATE__ and __TIME__
>
>Problem is, those are evaluated by the preprocessor at compile time. 
>If I modify a file which doesn't reference those macros and forget 
>to do a "rebuild all", the version string doesn't get updated.
>
>In ICC12 (both v6 and v7) there's a text field under the "Compiler" 
>tab of the "Compiler Options" dialog labeled "Execute Command After 
>Successful Build:"
>
>Right now, I'm using this field to touch (update the modification 
>time) on the file which builds the timestamp. That way, (assuming 
>the build completed successfully) the next time I rebuild, that file 
>will be guaranteed to recompile, regardless of whether I edit it or not.
>
>Ideally, I'd touch this file *before* building so I know that the 
>string always accurately reflects the date and time of when the 
>program was built, regardless of whether the previous compile was 
>clean or not..
>
>
>Any suggestions?
>Thanks.
>
>Barry
>
>_______________________________________________
>Icc-mot mailing list
>Icc-mot at imagecraft.com
>http://dragonsgate.net/mailman/listinfo/icc-mot
>


_______________________________________________
Icc-mot mailing list
Icc-mot at imagecraft.com
http://dragonsgate.net/mailman/listinfo/icc-mot



More information about the Icc-mot mailing list