cancel
Showing results for 
Search instead for 
Did you mean: 

how to built in a timestamp in stm32 hex file as a variable

dieter 123
Associate III
Posted on August 14, 2017 at 14:19

Hi

I am using IAR. Is there an easy way to built in a timestamp in my firmware? So later on I can check when the running FW on my board was compiled?

Or does IAR come with such a feature? I a using IAR and STM32f4

Thx

2 REPLIES 2
Posted on August 14, 2017 at 14:52

Check out __TIME__ (and __DATE__) - see C99, 6.10.8.

JW

Posted on August 14, 2017 at 17:03

printf('FW: %s %s\r\n',__TIME__,__DATE__); // time stamp of source file line is in.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..