I would like to access the git HEAD hash from within my source code so that, e.g., I can write it as part of an output file to identify the firmware that generated the file. I've found a few ways to do this using custom build steps, e.g., following the directions here:
However, in implementing these, I've been wondering if there is a simpler way to do this specific to Simplicty Studio, e.g., by using the Simplicity Studio build variables. Is there a recommended way to do this?
As Simplicity Studio is not integrated with git, I am not aware of a better way to do it than is documented in the stackoverflow article. If someone else has found a better way to do this, please share it on this thread.