cancel
Showing results for 
Search instead for 
Did you mean: 

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

TH.16.336
Associate III

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.

2 REPLIES 2
Ozone
Lead

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

Thanks for the answer. It helped