I use the STM32CubeIDE headless build in an automated build pipeline. The build command itself is in the following form:
stm32cubeidec.exe --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data <folder> -import <project> -build <project>/Release
This works well, but I noticed that the build itself takes around 15 seconds, but after that the command takes 1 to 2 minutes to exit. This is annoying since it makes the build process take much longer than necessary.
I tried to run the command directly from the command-line and time the running time on two different computers. The results were similar like this:
...
09:30:11 Build Finished. 0 errors, 0 warnings. (took 15s.99ms)
real 2m25.843s
The "Build finished" message is printed after about 20 seconds and at that time the output binaries have been generated, but the command just hangs for a couple of minutes. No error messages are displayed.