Headless build problem!

cancel
Showing results for 
Search instead for 
Did you mean: 

Headless build problem!

Jump to solution
673 Views
dave408
Senior Contributor II

I set up a new continuous integration environment and can build my project in KDS fine.  However, when I use eclipsec to build headless, I get this error in the log:

java.lang.IllegalStateException: Workbench has not been created yet.     at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:93)     at com.processorexpert.core.kpsdk.preferences.PEProjectExtenderSDK.projectLoadCompleted(PEProjectExtenderSDK.java:1335)     at com.processorexpert.core.ProjectPE.projectLoadCompleted(ProjectPE.java:6216)     at com.processorexpert.core.client.ProjectPEclient.loadProject(ProjectPEclient.java:2206)     at com.processorexpert.core.client.PEApplicationClient.openProject(PEApplicationClient.java:162)     at com.processorexpert.core.ProjectManager.getProject(ProjectManager.java:240)     at com.processorexpert.core.application.PExApplication.generateProject(PExApplication.java:144)     at com.processorexpert.core.application.PExApplication.run(PExApplication.java:83)     at com.processorexpert.core.application.PExApplication.start(PExApplication.java:55)     at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)     at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)     at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)     at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)     at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)     at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)     at org.eclipse.equinox.launcher.Main.run(Main.java:1465) com.freescale.processorexpert.core: java.lang.IllegalStateException: Workbench has not been created yet. Project KDS3_DN2 cannot be opened ilg.gnuarmeclipse.managedbuild.cross.stop() ilg.gnuarmeclipse.core.stop() LateInitializer.added() org.eclipse.core.runtime.preferences.IEclipsePreferences$NodeChangeEvent[source=/default] org.eclipse.debug.core

 

The project continues to compile despite this error, but the end result is that several source files do not compile, so the linker fails.  Even if the linking step succeeded, I would be a little nervous due to this error message.

 

If I open the same project in KDS and build there, my code compiles and links without any errors.

 

Can anyone tell me how to fix or further debug this problem?  Thanks!

Labels (1)
0 Kudos
1 Solution
183 Views
liborukropec
NXP Employee
NXP Employee

From the screenshots it seems everything OK. I'd double check that the KSDK_PATH environment variable is available and with correct value during the headless build (if it is executed via any continuous integration system or with another user it may result in different environment set), e.g. echoing to the console just before the build is executed.

Libor

View solution in original post

6 Replies
183 Views
liborukropec
NXP Employee
NXP Employee

Hi Dave,

it seems like a problem in Processor Expert headless generation, when the Kinetis SDK preferences have some problem. Please try to open the PEx project in the UI, open PEx project and open the Kinetis SDK preferences and see if there's problem (probably with path) that has to be fixed.

If this does not help, you can try to add additional parameter "-PExQuietMode" to the command line that disables UI dialogs when some problem is reported using dialogs. This can be workaround for the mentioned probelm in KSDK preferences.

Also the command line parameters that you are using can help us, including screenshot of the KSDK preference panel.

Regards,

Libor

0 Kudos
183 Views
dave408
Senior Contributor II

Thanks for your reply, Libor.  I will have to edit my post -- I did try running the build from KDS, and I do not get any errors there.  It compiles and links great.  It's just the headless build that doesn't work.  On another build server with the same versions of KDS/Eclipse components, headless builds work fine.  I'll double check the KSDK preferences, though.

I had inquired in a different post about quieting UI dialogs -- thank you for mentioning this!  However, I am of the mindset now that having the build freeze on me is okay, as this implies that there's something wrong going on.

Here are my KSDK and Processor Expert preferences:

pastedImage_0.png

pastedImage_0.png

This is the command line string used for generating the PEx code:

c:\Freescale\KDS_3.0.0\eclipse\eclipsec.exe -noSplash -data C:\MyProjectFolder -application com.freescale.processorexpert.core.PExApplication -generate MyProjectName

0 Kudos
184 Views
liborukropec
NXP Employee
NXP Employee

From the screenshots it seems everything OK. I'd double check that the KSDK_PATH environment variable is available and with correct value during the headless build (if it is executed via any continuous integration system or with another user it may result in different environment set), e.g. echoing to the console just before the build is executed.

Libor

View solution in original post

183 Views
dave408
Senior Contributor II

Libor, thank you very much!  That was the problem.

0 Kudos
183 Views
dave408
Senior Contributor II

You were right!  The KSDK_PATH variable is not being used.  Probably because I had set it as a User environment variable, rather than a System one.  That was dumb.  I'm rebooting the server to see if that changes anything, and will mark your answer once I find it!  Thanks!

0 Kudos
183 Views
dave408
Senior Contributor II

Great idea!  Thank you, I will give that a try right now.

0 Kudos