This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
I'm looking at ways to get a revision number that I can read from the firmware. One approach that I like is to pull in the git commit hash during build, as described in this stackoverflow answer: (http://stackoverflow.com/a/12368262). The linked answer relies on adding a variable to the makefile which can be accessed by the code like a preprocessor define. -DVERSION also needs to be added to CFLAGS (not sure how to do this either).
My question is, can I do this in Code Composer Studio without changing the project around too much? My Project >Properties > C/C++ Build options are currently set to "Generate Makefiles automatically". Would I have to use a custom Makefile? Could I do this with a Build Variable? Is there a better way to approach a build number in general?
Would greatly appreciate some help.
I'm currently using CCS 6.1.2.00015 on Ubuntu 14.04 (64-bit).
Thanks!