2019-07-29 11:40 PM
Hello,
I created a project with many C files (around 50 or 60) and the build is incredibly slow. I'm just doing "build project", and even when nothing changed in the project, it takes several MINUTES just to start compiling the few modified C files.
The build command line is supposed to be "make -j2 all" but it apparently takes forever before it is actually executed.
Any hint ?
EDIT: I tried to execute the make command outside the IDE but I get an error "multiple target patterns". I have to mention that the source file are on a linux server whose disk is mounted on my windows PC. I tried the make directly on the linux server which may explain the issue.
2019-09-09 10:59 AM
Any progress here, guillaume ?
Sound suspiciously similar to: https://forum.atollic.com/viewtopic.php?t=197
(although the link is for a slow bug in the CDT internal builder)
2020-05-05 10:01 AM
Found a problem with the external make.exe they are using (inside plugin named com.st.stm32cube.ide.mcu.externaltools.make.win32_1.1.0.201910081157)
Replacing it with GNU Make 4.1 makes the build process more that 2 times faster.
2020-07-17 03:53 PM
@VK.17ostadinov Can you detail how you setup STM32Cube to use Gnu Make 4.1?
2020-07-17 04:12 PM
For ST developers, I have a hint for the packaged make.exe: (STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.make.win32_1.1.0.201910081157\tools\bin\make.exe)
Microsoft Procmon.exe shows that each time make.exe opens a directory that is large, it must do the job twice because : QueryAllInformationFile result BUFFER OVERFLOW
This just indicates that the initially allocated buffer for the return is too small. So then the API call has to be repeated with a bigger buffer. These should all go away if you just use a larger buffer in the first place.
2020-07-18 12:39 PM
> Microsoft Procmon.exe shows that each time make.exe opens a directory that is large, it must do the job twice because : QueryAllInformationFile result BUFFER OVERFLOW
Large directory (too many files) or long path?
-- pa
2020-07-20 06:09 AM
Basically you just replace the make.exe with file from other package.
The file is located in STM32CubeIDE install:
STM32CubeIDE_1.0.0-install-dir\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.make.win32_1.1.0.201910081157\tools\bin\make.exe
Have in mind the version of plugin (directory name) will differ with the version of the IDE package.
You can download make.exe from here:
2020-07-20 12:21 PM
Undoubtedly it exceeds the buffer, but the path is the default path for the installer and the program is not abnormally large, just a typical, HAL based STM32Cube project.
2020-07-20 12:25 PM
My own solution is this:
Using https://chocolatey.org/ I installed Gnumake 4.3 form the approved packages.
Then set the builder in the Project properties:
The j12 is for my CPU, use as many threads as your CPU has.
It trims ~ 20% off a full build which is CPU intensive.
But it trims 60% off the time to make a target that is already built.
That was worth the effort!