2021-02-13 02:59 AM
Hello,
I'm using the __date__/__time__ macros. Their values are only updated if the file using them is re-compiled. Cleaning up before building forces the values to be updated, but this is not feasible on bigger projects.
Is there a way to tell CubeIDE that a specific file always has to be rebuild? I only found solutions for makefiles, but CubeIDE is not using makefiles.
Regards
Solved! Go to Solution.
2024-12-13 11:06 AM
As in previous replies, touching the file will force a recompile of the file. In my case I need to recompile a version.c file to capture __date__ and __time__ for every build and was able to do so with the following line as the pre-build step command. The path refers to the directory structure within the build directory.
if [ -f path/to/version.o ]; then rm path/to/version.o; fi
-rob