Page 1 of 1

Embedding application build time/date (maybe git hash)

Posted: Tue Oct 24, 2017 2:08 am
by cmorgan
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

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

Posted: Tue Oct 24, 2017 3:05 am
by WiFive
Maybe similar to how IDF_VER is done
https://github.com/espressif/esp-idf/se ... _VER&type=

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

Posted: Tue Oct 24, 2017 3:08 am
by sambristow_syrp
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.