Skip to main content
dieter 123
Associate III
August 14, 2017
Question

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

  • August 14, 2017
  • 1 reply
  • 731 views
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

    This topic has been closed for replies.

    1 reply

    waclawek.jan
    Super User
    August 14, 2017
    Posted on August 14, 2017 at 14:52

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

    JW

    Tesla DeLorean
    Guru
    August 14, 2017
    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 VenmoUp vote any posts that you find helpful, it shows what's working..