Solved
How to create Windows batch script to build STM32CubeIDE project
Hi,
I created a Windows batch file trying to build STM32CubeIDE project, but somehow it always got the workspace error and please help to clarify, thanks.
Here is my batch script.
set CUBEIDE_PATH=C:\ST\STM32CubeIDE_1.13.2\STM32CubeIDE
set WORKSPACE=C:\Users\James.Shih\STM32CubeIDE\workspace_1.13.2
set PROJECT=vB+STM32G070
set CONSOLE=-vmargs -Dorg.eclipse.cdt.core.console=org.eclipse.cdt.core.systemConsole
set HEADLESS=--launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild
%CUBEIDE_PATH%\stm32cubeidec.exe %HEADLESS% -build %PROJECT% %WORKSPACE% %CONSOLE%
Here is the error logs.
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Workspace is already closed or not ready yet. Consider tracking the org.eclipse.core.resources.IWorkspace service (using your favorite technique, e.g. Declarative Services, ServiceTracker, Blueprint, ...) instead of calling the static method here to prevent such issues!
