Embedding application build time/date (maybe git hash)

cmorgan
Posts: 89
Joined: Thu Aug 24, 2017 12:52 am

Embedding application build time/date (maybe git hash)

Postby cmorgan » Tue Oct 24, 2017 2:08 am

Hello.

I'm looking to embed the application build time/date into my binary and maybe the git hash. Any recommendations for how to properly integrate that kind of thing into the build process? I've reviewed http://esp-idf.readthedocs.io/en/v2.1/a ... d%20system but still not sure which is the best approach to take to embed that information.

Chris

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Embedding application build time/date (maybe git hash)

Postby WiFive » Tue Oct 24, 2017 3:05 am

Maybe similar to how IDF_VER is done
https://github.com/espressif/esp-idf/se ... _VER&type=

sambristow_syrp
Posts: 1
Joined: Tue Oct 24, 2017 3:00 am

Re: Embedding application build time/date (maybe git hash)

Postby sambristow_syrp » Tue Oct 24, 2017 3:08 am

Take a look at https://github.com/stoggi/cmake-git-version.

It works in a similar way to the IDF_VER that WiFive mentioned but with a bit of Python wrapping it for extra checking.

Who is online

Users browsing this forum: Google [Bot] and 109 guests