2024-06-05 04:09 PM
STM32CubeIDE v1.15.1
Git v2.45.1.windows.1
Windows 11
The software project includes the pre-build command,
"git log --pretty=format:'%H' -n 1 > git_hash.h" (format string simplified for this post)
On a fresh install on a new PC the following error prevents building the project,
"fatal: bad object HEAD"
Building on other computers doesn't produce this error. On this computer, git works from the command line, including copying the string from the pre-build settings into the Command Shell Console in STM32CubeIDE. Running STM32CubeIDE as administrator doesn't change behavior.
The command 'where git' returns the same path in both cmd.exe and STM32CubeIDE console. All git operations function normally from both the command line and a GUI tool (GitExtensions).
Thoughts on the source of the git error?
Could STM32CubeIDE be using a different git.exe than is mapped to 'git' in the system?
Thanks!
Solved! Go to Solution.
2024-06-05 05:27 PM
Update - STMCubeIDE v1.14.1 compiles the project a creates git_hash.h w/o errors
2024-06-05 05:27 PM
Update - STMCubeIDE v1.14.1 compiles the project a creates git_hash.h w/o errors