embeded/Cortex-M3 STM2025. 11. 24. 19:08

pre-build steps 에서 명령을 주어 특정 파일을 행성해서 그 변수에 값을 넣어주는 방식

머.. 어짜피 이것도 makefile로 생성될테니 방법은 방법이지

 

 

git log --pretty=format:'#define GIT_INFO_PRESENT%n static const char* GIT_INFO = "Version Information=[%H,%d]\r\n";' -n 1 > ../Core/Inc/gitcommit.h

[링크 : https://community.st.com/t5/stm32-mcus-embedded-software/git-commit-hash-flashed-along-with-my-code/td-p/179180]

Posted by 구차니