2019-06-28 02:24 AM
Hi
I am evaluating the new STM32CubeIDE .
When trying to create a new project (based on an existing project done using eclipse + GNU ARM Eclipse) i am encountering a problem when accessing the project properties to define include directories; Preprocessor defines, etc...
When assessing "Project -> Properties -> C/C++ Build -> Settings" i am getting a "java.lang.NullPointerException". The error log is in the Post
The project was created as a new C project, I then copied to the folder the respective source code. The project was created as a "C project" and ToolChain selected was "MCU ARM GCC".
If i create a project as a "STM32 Project" using "Cube" to generate the code i am able to access this menu.
STM32Cube Version -> 1.0.1
Build: 3139_20190612-1256 (UTC)
Java: 1.8.0_211
OS: Windows 10 v1903
!ENTRY org.eclipse.jface 4 2 2019-06-28 10:09:29.817
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.NullPointerException
at com.st.stm32cube.ide.mcu.build.setup.BuildSetupUtilities.getCpu(BuildSetupUtilities.java:2679)
at com.st.stm32cube.ide.mcu.toolchain.armnone.setup.options.FpuValueHandler.isEnumValueAppropriate(FpuValueHandler.java:38)
at org.eclipse.cdt.managedbuilder.ui.properties.BuildOptionSettingsUI.createFieldEditors(BuildOptionSettingsUI.java:422)
at org.eclipse.jface.preference.FieldEditorPreferencePage.createContents(FieldEditorPreferencePage.java:228)
at org.eclipse.jface.preference.PreferencePage.createControl(PreferencePage.java:244)
at org.eclipse.cdt.managedbuilder.ui.properties.ToolSettingsTab.displayOptionsForCategory(ToolSettingsTab.java:245)
at org.eclipse.cdt.managedbuilder.ui.properties.ToolSettingsTab.handleOptionSelection(ToolSettingsTab.java:493)
at org.eclipse.cdt.managedbuilder.ui.properties.ToolSettingsTab.access$1(ToolSettingsTab.java:476)
at org.eclipse.cdt.managedbuilder.ui.properties.ToolSettingsTab$2.selectionChanged(ToolSettingsTab.java:170)
at org.eclipse.jface.viewers.Viewer$1.run(Viewer.java:151)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:47)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:176)
at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:148)
at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2181)
at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1718)
at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1084)
at org.eclipse.cdt.managedbuilder.ui.properties.ToolSettingsTab.setValues(ToolSettingsTab.java:437)
at org.eclipse.cdt.managedbuilder.ui.properties.ToolSettingsTab.updateData(ToolSettingsTab.java:742)
at org.eclipse.cdt.managedbuilder.ui.properties.ToolSettingsTab.setVisible(ToolSettingsTab.java:383)
at org.eclipse.cdt.ui.newui.AbstractCPropertyTab.handleTabEvent(AbstractCPropertyTab.java:603)
at org.eclipse.cdt.ui.newui.AbstractPage.updateSelectedTab(AbstractPage.java:404)
at org.eclipse.cdt.ui.newui.AbstractPage.createWidgets(AbstractPage.java:392)
at org.eclipse.cdt.ui.newui.AbstractPage.contentForCDT(AbstractPage.java:351)
at org.eclipse.cdt.ui.newui.AbstractPage.createContents(AbstractPage.java:248)
at org.eclipse.jface.preference.PreferencePage.createControl(PreferencePage.java:244)
at org.eclipse.jface.preference.PreferenceDialog.createPageControl(PreferenceDialog.java:1429)
at org.eclipse.jface.preference.PreferenceDialog$8.run(PreferenceDialog.java:1196)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:47)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:176)
at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1188)
at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:675)
at org.eclipse.jface.preference.PreferenceDialog$5.lambda$0(PreferenceDialog.java:660)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72)
at org.eclipse.jface.preference.PreferenceDialog$5.selectionChanged(PreferenceDialog.java:657)
at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:874)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:47)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:176)
at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:871)
at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1240)
at org.eclipse.jface.viewers.StructuredViewer.lambda$0(StructuredViewer.java:1263)
at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84)
at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:265)
at org.eclipse.jface.util.OpenStrategy.access$5(OpenStrategy.java:260)
at org.eclipse.jface.util.OpenStrategy$1.lambda$1(OpenStrategy.java:430)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3919)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3550)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
at org.eclipse.jface.window.Window.open(Window.java:799)
at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:160)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:568)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1055)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3944)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3547)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:566)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:661)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
at org.eclipse.equinox.launcher.Main.run(Main.java:1476)
Solved! Go to Solution.
2019-06-28 04:31 AM
The only wizard that's supported is through the New -> STM32 Project flow.
If you want to add your own source code to an empty project you must still use the New -> STM32 Project and then select "Empty Project" on the same screen you name your project.
2019-06-28 04:31 AM
The only wizard that's supported is through the New -> STM32 Project flow.
If you want to add your own source code to an empty project you must still use the New -> STM32 Project and then select "Empty Project" on the same screen you name your project.
2019-06-28 11:18 AM
Hi
Thanks for the feedback.
That was the way i did to create the project (just didn't select the empty project, created a Cube project and then deleted the files and copy the ones related to my project).