Add build date/time (and maybe repository revision) information to compiled binary

Hi,

I want to add some build information (hard coded) into my binary. Is there any way how I can access the current date/time and maybe the revision number of a SVN repository during the build process and use this information to initialize a constant variable/string in flash memory?

If I remember correctly, one of our old projects, using IAR Embedded Workbench, auto-generated an include file which provided macros for variable initialization during compilation (before compilation started). Can Visual Studio Code and the nRF Connect plugin do this, too?

Best regards,
Michael