On Tue, Mar 17, 2009 at 7:08 AM,  <[email protected]> wrote:
>
> Hello Group,
>
> I like to include somewhere in my code some values that
> resemble the compile date and are accessible as numbers.
> Moreover having them coded as BCD numbers in order
> [...]
> but spending sth. >540 bytes to this purpose is a bit too
> much ado for sth. that could be basically done in a handful
> of move instructions (i.e. sth. smaller than 64 bytes).

There was a recent thread on this very subject, I think... Or perhaps
that was over on the avr-gcc list..

There's only so much you can reasonably expect the pre-processor to
do. In situations like this, I have resorted to external scripting and makefile
rules to ensure that some .o is rebuilt every time with either:

 o date and time specified exactly as I need via -DBUILD_ISO_WEEK=${ISO_WEEK}
    added to the ${CC} command line for that target

or

 o a dynamically generated .c or .h file that accomplishes the same thing and
    is built every time

-- 
Andy

Reply via email to