Skip to main content
TH.16.336
Associate III
January 29, 2020
Question

How to use code compiled date & time in my code on STM32F446RE Nucleo board?

  • January 29, 2020
  • 2 replies
  • 1836 views

Hello All,

I am using STM32F446RE Nucleo board. As part of displaying the software version, I need to know how to Capture and Display the current code compiled Date & Time in my code.

For example,::

If I compile the code @ 29-Jan-2020 12:44:37.20 and flash the code onto the Nucleo board. It should always display that information.

Suppose if the same Binary is used after a year for flashing on some other board, still it should show the same information of Date and Time.

I am using System workbench for STM32 IDE. I couldn't get any useful discussion on this, so asking here.

Please do the needful.

This topic has been closed for replies.

2 replies

Ozone
Principal
January 29, 2020

You could use the ANSI C preprocessor macros _DATE_ and _TIME_.

TH.16.336
TH.16.336Author
Associate III
January 31, 2020

Thanks for the answer. It helped