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.
2021-02-13 05:17 AM
You can add a pre-build step in the C/C++ Build Settings. The pre-build step can be any command like touch or a shell script generating a version file etc..
2021-02-13 04:22 AM
> but CubeIDE is not using makefiles
Nevertheless if you touch a source file, eclipse usually recompiles it.
-- pa
2021-02-13 05:17 AM
You can add a pre-build step in the C/C++ Build Settings. The pre-build step can be any command like touch or a shell script generating a version file etc..
2021-02-14 01:07 AM
Hello Pavel & KnarfB,
okay, I'll check those ways. I'll have to figure out if Windows has a function similar to the touch command on Linux.
Thank you.
Regards
2021-02-14 02:01 AM
Hi RAltm,
copy/b test.txt +,,
does the trick in Windows. A real "touch" comes with the STM32CubeIDE plugins like:
C:\ST\STM32CubeIDE\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.make.win32_1.5.0.202011040924\tools\bin\busybox.exe touch test.txt
Your path may vary
hth
KnarfB
2021-02-14 03:51 AM
Actually much easier. Just make a small change in the file, undo, save. Or, delete corresponding object files.
-- pa
2021-02-14 11:06 PM
Well, I dont think so. For production builds, I would avoid any additional human action in favor of automatted tooling.
2021-02-15 12:48 PM
For production you would prefer full clean rebuild which will rebuild everything.
2024-04-04 11:26 PM
Actually quite easy to forget in the middle of debugging a rather tricky problem.
2024-04-04 11:27 PM - edited 2024-04-04 11:28 PM
You are quite right. Production builds should be done with a clean and full build. It's surprising how many little problems can sneak through the IDE's checks which only bring up an error with a full build.