cancel
Showing results for 
Search instead for 
Did you mean: 

Java error when enabling X-CUBE-FREERTOS on STM32U5

grumblyturtle
Associate II

6.11.1 with STM32U575RITx

when I click "CMSIS RTOS2" to enable the installed middleware X-CUBE-FREERTOS, mouse shows a busy icon and the FreeRTOS configuration in the bottom panel never opens.

 

STM32CubeIDE can open the IOC file and the FreeRTOS configuration panel is displayed there fine.

 

 

2024-06-23 22:29:08,573 [INFO] ThirdParty:1030 - CMSIS Pack Vendor :STMicroelectronics X-CUBE-TOF1 3.0.0
2024-06-23 22:29:08,574 [INFO] ThirdPartyModel:298 - Start build external matchings
2024-06-23 22:29:10,742 [INFO] ThirdPartyModel:316 - End build external matchings
2024-06-23 22:29:10,778 [INFO] LoadServerUpdatesThread:375 - End of LoadServerUpdate Thread
Jun 23, 2024 10:29:38 PM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode
WARNING: Could not lock System prefs. Unix error code 2.
Jun 23, 2024 10:29:38 PM java.util.prefs.FileSystemPreferences syncWorld
WARNING: Couldn't flush system prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
2024-06-23 22:30:08,141 [INFO] RtosManager:919 - Current active RTOS is STMicroelectronics.X-CUBE-FREERTOS.1.2.0 [CortexM33]
Jun 23, 2024 10:30:08 PM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode
WARNING: Could not lock System prefs. Unix error code 2.
Jun 23, 2024 10:30:08 PM java.util.prefs.FileSystemPreferences syncWorld
WARNING: Couldn't flush system prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: 'void sun.misc.Unsafe.ensureClassInitialized(java.lang.Class)'
	at com.oracle.truffle.api.library.LibraryFactory.ensureLibraryInitialized(LibraryFactory.java:384)
	at com.oracle.truffle.api.library.LibraryFactory.getUncached(LibraryFactory.java:364)
	at com.oracle.truffle.api.library.LibraryFactory.<init>(LibraryFactory.java:210)
	at com.oracle.truffle.api.interop.InteropLibraryGen.<init>(InteropLibraryGen.java:178)
	at com.oracle.truffle.api.interop.InteropLibraryGen.<clinit>(InteropLibraryGen.java:169)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:529)
	at java.base/java.lang.Class.forName(Class.java:508)
	at com.oracle.truffle.api.library.LibraryFactory.loadGeneratedClass(LibraryFactory.java:791)
	at com.oracle.truffle.api.library.LibraryFactory.resolveImpl(LibraryFactory.java:740)
	at com.oracle.truffle.api.library.LibraryFactory.resolve(LibraryFactory.java:733)
	at com.oracle.truffle.api.interop.InteropLibrary.<clinit>(InteropLibrary.java:2941)
	at com.oracle.truffle.polyglot.PolyglotValueDispatch.<clinit>(PolyglotValueDispatch.java:170)
	at com.oracle.truffle.polyglot.PolyglotImpl.initialize(PolyglotImpl.java:166)
	at org.graalvm.polyglot.impl.AbstractPolyglotImpl.setConstructors(AbstractPolyglotImpl.java:288)
	at org.graalvm.polyglot.Engine$1.loadAndValidateProviders(Engine.java:1107)
	at org.graalvm.polyglot.Engine$1.run(Engine.java:1067)
	at org.graalvm.polyglot.Engine$1.run(Engine.java:1061)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
	at org.graalvm.polyglot.Engine.initEngineImpl(Engine.java:1061)
	at org.graalvm.polyglot.Engine$ImplHolder.<clinit>(Engine.java:143)
	at org.graalvm.polyglot.Engine.getImpl(Engine.java:367)
	at org.graalvm.polyglot.Engine$Builder.build(Engine.java:665)
	at com.st.microxplorer.mcu.rtos.data.RtosDataEditor.<init>(RtosDataEditor.java:365)
	at com.st.microxplorer.mcu.rtos.data.RtosDataPanel.createDefaultTask(RtosDataPanel.java:289)
	at com.st.microxplorer.mcu.rtos.data.RtosDataPanel.<init>(RtosDataPanel.java:151)
	at com.st.microxplorer.mcu.rtos.data.RtosDataGroupPanel.<init>(RtosDataGroupPanel.java:39)
	at com.st.microxplorer.mcu.rtos.data.RtosUserConfigurationPanelBuilder.getConfigurationPanels(RtosUserConfigurationPanelBuilder.java:55)
	at com.st.microxplorer.mcu.rtos.data.RtosUserConfigurationPanelBuilder.getRtosConfigurationPanel(RtosUserConfigurationPanelBuilder.java:122)
	at com.st.microxplorer.plugins.ipmanager.generictreatment.gui.MainPanel.buildSharedComponentTabs(MainPanel.java:429)
	at com.st.microxplorer.plugins.ipmanager.generictreatment.gui.MainPanel.createTabs(MainPanel.java:387)
	at com.st.microxplorer.plugins.ipmanager.generictreatment.gui.MainPanel.<init>(MainPanel.java:164)
	at com.st.microxplorer.plugins.ip.genericplugin.GenericPlugin.getUI(GenericPlugin.java:48)
	at com.st.microxplorer.plugins.ipmanager.gui.BlockDiagram.createIpPanel(BlockDiagram.java:422)
	at com.st.microxplorer.plugins.ipmanager.gui.BlockDiagram.getIPConfigPanel(BlockDiagram.java:560)
	at com.st.microxplorer.plugins.ipmanager.gui.BlockDiagram.getIPConfigPanel(BlockDiagram.java:466)
	at com.st.microxplorer.plugins.ipmanager.gui.BlockDiagram.propertyChange(BlockDiagram.java:1311)
	at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:343)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:335)
	at com.st.microxplorer.mxsystem.MxSystem.propertyChange(MxSystem.java:474)
	at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:343)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:335)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:268)
	at com.st.microxplorer.util.MXPropertyChangeSupport.firePropertyChange(MXPropertyChangeSupport.java:54)
	at com.st.microxplorer.mcu.Mcu.propertyChange(Mcu.java:1803)
	at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:343)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:335)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:268)
	at com.st.microxplorer.util.MXPropertyChangeSupport.firePropertyChange(MXPropertyChangeSupport.java:54)
	at com.st.microxplorer.mcu.Mode.firePropertyChange(Mode.java:2208)
	at com.st.microxplorer.mcu.Mode.setMode(Mode.java:1935)
	at com.st.microxplorer.peripheralpanel.CheckSwPackMode.doAction(SwPackMode.java:910)
	at com.st.microxplorer.peripheralpanel.CheckSwPackMode$1.run(SwPackMode.java:894)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	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)
2024-06-23 22:30:08,606 [WARN] IP:2120 - rccPrivilegeSecure not found: check if there is a RefParameter without a condition.
2024-06-23 22:30:08,607 [WARN] IP:2120 - rccSecurity not found: check if there is a RefParameter without a condition.
2024-06-23 22:30:08,683 [WARN] IP:2120 - rccPrivilegeSecure not found: check if there is a RefParameter without a condition.
2024-06-23 22:30:08,683 [WARN] IP:2120 - rccSecurity not found: check if there is a RefParameter without a condition.
Jun 23, 2024 10:30:38 PM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

I think opening the IOC file in STM32 Cube IDE fixed the problem, somehow.

The RTOS tab now works normally in Cube MX.

also yes everything is installed.

Screenshot_20240625_224022.png

 

Screenshot_20240625_224057.png

 

View solution in original post

5 REPLIES 5
Amel NASRI
ST Employee

Hi @grumblyturtle ,

Before Selecting the FreeRTOS™ version and heap model at CMSIS RTOS2, make sure that X-CUBE-FreeRTOS is added properly.

You need to:

  1. click [Select Components] under the [Software Packs] menu.
  2. Scroll down the list and select [STMicroelectronics.X-CUBE-FREERTOS]. In case it is not installed or you would need to use a different version, install it first using the [Install] button within the [Selection] column.

Try this way and let me know if you still have the java issue or not.

-Amel

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.

grumblyturtle
Associate II

Thanks for the reply, obviously the module is installed, otherwise I would not even see the checkbox to enable it.

Clicking the CMSIS RTOS2 checkbox produces the described freeze and errors in the log.

 

What About the Heap? Make sure that required selections are done:

AmelNASRI_0-1719244781297.png

-Amel

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.

I think opening the IOC file in STM32 Cube IDE fixed the problem, somehow.

The RTOS tab now works normally in Cube MX.

also yes everything is installed.

Screenshot_20240625_224022.png

 

Screenshot_20240625_224057.png

 

Glad to know that your problem is fixed. Have a nice day @grumblyturtle.

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.