Problem with the STM32CubeIDE incremental build - bug report and workaround
While working on a specific project, it is very convenient to compile only the files that have been changed. Incremental build is enabled by default in the project settings: Project properties => C/C++ Build => Behavior => Build: (Incremental build) = Enabled.
Then, after working on the project for a while, this option no longer works, although it appears to be still enabled when you look at the project settings.
Workaround: I found out that it can be re-enabled by disabling it in the project settings and then re-enabling it.
When the incremental build is running, the ".cproject" file has the following content - see extract below:
<builder buildPath="${workspace_loc:/DEMO_STM32H743}/Debug" enabledIncrementalBuild="true" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.1002271674" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
But when the incremental build no longer works (without disabling it myself via the IDE interface), the content is as follows:
<builder buildPath="${workspace_loc:/DEMO_STM32H743}/Debug" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.1002271674" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
The [enabledIncrementalBuild="true"] option suddenly disappears. I have not been able to reliably determine when exactly this happens. It happened once after I have done the Project Clean. When I tried to do it again today, it didn't happen. I'm also not sure that the issue is only related to the ".cproject" file. Once I opened the same project in a new (clean) workspace and the incremental build worked again.
