cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX 5.0.1 won't Generate Code

XI
Associate

Hi,

We are trying to evaluate STM32CubeMX, I can launch it and use it normally, but I have some troubles: it won't generate code when clicking "Generate Code" button. Instead, it produces this error and doesn't do anything more: "Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

       at com.st.microxplorer.plugins.projectmanager.engine.MainProjectManager.startGenerateCode(MainProjectManager.java:932)"

I have found several posts asking to use Oracle official java instead of OpenJRE, however, I tried many versions of Java, including the following ones:

  • java-8-openjdk-amd64
  • java-8-oracle
  • java-11-oracle

I am running Linux (Debian Jessie base) with STM32CubeMX 5.0.1, and I always get the exact same error with all java version tried.

(note that I tried STM32CubeMX 4.27.0 too, and with this version I can generate the code. It seems a bug has been introduced with version 5.0.1? Any other though?)

Details on the error I get:

2019-02-19 09:19:43,641 [INFO] UtilMem:74 - End SaveConfig() Used Memory: 145105408 Bytes (874512384)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at com.st.microxplorer.plugins.projectmanager.engine.MainProjectManager.startGenerateCode(MainProjectManager.java:932)
        at com.st.microxplorer.plugins.projectmanager.ProjectManagerView.launchGenerateCode(ProjectManagerView.java:1007)
        at com.st.microxplorer.plugins.projectmanager.ProjectManagerView.generateCode(ProjectManagerView.java:956)
        at com.st.microxplorer.plugins.projectmanager.ProjectManagerView.getSpecificTask(ProjectManagerView.java:559)
        at com.st.microxplorer.maingui.RibbonBar$1.actionPerformed(RibbonBar.java:251)
        at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
        at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
        at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
        at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
        at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
        at java.desktop/java.awt.Component.processMouseEvent(Component.java:6632)
        at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
        at java.desktop/java.awt.Component.processEvent(Component.java:6397)
        at java.desktop/java.awt.Container.processEvent(Container.java:2263)
        at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5008)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
        at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
        at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
        at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
        at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
        at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
2019-02-19 09:22:01,981 [INFO] About:229 - Db Path : /usr/local/STMicroelectronics/STM32Cube/STM32CubeMX//db/
2019-02-19 09:22:01,982 [INFO] About:236 - Version : DB.5.0.1

Thanks for your help!

0 REPLIES 0