2023-11-22 04:04 PM
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%
!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!
Solved! Go to Solution.
2023-12-04 09:09 AM
Hello @James-Shih
First let me thank you for posting and I apologize for the late reply :).
Try to use this script it should work :
set CUBEIDE_PATH=C:\ST\STM32CubeIDE_1.14.0\STM32CubeIDE
set WORKSPACE=C:\Users\chernise\STM32CubeIDE\workspace_1.14.0new
set PROJECT=headless_build
cd %CUBEIDE_PATH%
CALL headless-build.bat -data %WORKSPACE% -cleanBuild %PROJECT%
KR,
Semer.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-12-04 09:09 AM
Hello @James-Shih
First let me thank you for posting and I apologize for the late reply :).
Try to use this script it should work :
set CUBEIDE_PATH=C:\ST\STM32CubeIDE_1.14.0\STM32CubeIDE
set WORKSPACE=C:\Users\chernise\STM32CubeIDE\workspace_1.14.0new
set PROJECT=headless_build
cd %CUBEIDE_PATH%
CALL headless-build.bat -data %WORKSPACE% -cleanBuild %PROJECT%
KR,
Semer.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-12-05 01:07 PM
Hi Semer,
Thanks for your help and now my problem is resolved :)
BR,
James Shih