2024-06-06 02:08 AM - edited 2024-06-06 03:36 AM
Hi,
I have upgraded from STM32CubeIde 1.12.1 to 1.15.1.
I am trying to build my project with STM32CubeIde v1.15.1 in headless mode on Ubuntu 22.04.
Note - This worked fine with v1.12.1 with no problems at all but now 1.15.1 there is.
The command I run is:
headless-build.sh -importAll .
I get the following error:
!SESSION 2024-06-06 09:06:41.652 -----------------------------------------------
eclipse.buildId=Version 1.15.1
java.version=17.0.8.1
java.vendor=Eclipse Adoptium
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -application org.eclipse.cdt.managedbuilder.core.headlessbuild -importAll .
Command-line arguments: -os linux -ws gtk -arch x86_64 -application org.eclipse.cdt.managedbuilder.core.headlessbuild -importAll .
!ENTRY org.eclipse.osgi 4 0 2024-06-06 09:06:42.067
!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!
at org.eclipse.core.resources.ResourcesPlugin.getWorkspace(ResourcesPlugin.java:502)
at org.eclipse.cdt.managedbuilder.internal.headlessbuilderapp.HeadlessBuilderWrapper.start(HeadlessBuilderWrapper.java:114)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:651)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:588)
at org.eclipse.equinox.launcher.Main.run(Main.java:1459)
at org.eclipse.equinox.launcher.Main.main(Main.java:1432)
Any help would be appreciated! Thanks!
Update: After installing older versions it seems to be an issue on v1.13.2 and v1.14.0 as well.....
Solved! Go to Solution.
2024-06-14 12:44 AM
The problem is using 1.12.1 I was able to import the projects into the folder I was already in, but with 1.15.1 you have to import the projects into a different folder which I was not already in.
E.G.
I was in the root folder where projectA/ is.
mkdir workspace/
headless-build.sh -data workspace/ -import projectA -cleanBuild projectA
2024-06-06 03:50 AM
i use
headless-build.sh -data /tmp/stm-workspace/ -import . -cleanBuild [Project]/[Target]
in an ubuntu 22.04 docker environment and it works. maybe try to set teh workspace folder manually with the data option?
2024-06-14 12:44 AM
The problem is using 1.12.1 I was able to import the projects into the folder I was already in, but with 1.15.1 you have to import the projects into a different folder which I was not already in.
E.G.
I was in the root folder where projectA/ is.
mkdir workspace/
headless-build.sh -data workspace/ -import projectA -cleanBuild projectA