Hi,
I would like to have the build/link date and time in my c code. When I use the __DATE__ and __TIME__ macro directly in the .c files I just get the compile date/time of this file. Since I want to get the compile date/time of the whole programm I thought about placing the __DATE__ and __TIME__ macros in the linker comand file. I read in slau131j on page 172 that the linker provides these macros.
But when I place somting like this
compile_time = __TIME__;
in my .cmd file I get the error: #10104 undefined symbol "15:10:42" used in expression
where 15:10:42 was the actual time I tried to compile the project.
This is probably because __TIME__ is a string literal and a linker symbol like my "compile_time" is a 32-bit unsigned integer.
Any ideas how I can solve this problem?