cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX unable to generate STM32CubeIDE project.

Kopytko
Associate

Hello, I got following problem.

STM32CubeMX is unable to properly generate .project file for STM32CubeIDE. After clicking "GENERATE CODE", MX is copying library files, generating .h and .c files, but no .project file. 

Following nullpointer exception can be found in log file. I already tested different versions of JAVA - no change.

 

I attached error messages, MX log, and .ioc file. 

Anyone managed to fix this?

 

 

2026-03-15 10:27:00,707 [ERROR] ToolchainGenerator:531 - 
java.lang.reflect.InvocationTargetException: null
	at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:115) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
	at com.st.microxplorer.plugins.projectmanager.model.ToolchainGenerator.CallMethod(ToolchainGenerator.java:406) ~[?:?]
	at com.st.microxplorer.plugins.projectmanager.model.ToolchainGenerator.generate(ToolchainGenerator.java:506) ~[?:?]
	at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createToolChainFolders(ProjectBuilder.java:5583) ~[?:?]
	at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createProject(ProjectBuilder.java:987) ~[?:?]
	at com.st.microxplorer.plugins.projectmanager.engine.GenerateProjectThread.run(GenerateProjectThread.java:61) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "Object.hashCode()" because "key" is null
	at java.util.Hashtable.put(Hashtable.java:481) ~[?:?]
	at sun.rmi.registry.RegistryImpl.rebind(RegistryImpl.java:287) ~[?:?]
	at com.st.stm32cube.ide.common.services.mx.jar.core.mx.rmi.MailBox.connectNewMailBox(MailBox.java:46) ~[?:?]
	at com.st.stm32cube.ide.common.services.mx.jar.core.mx.plugin.PlugIn.setupMailBox(PlugIn.java:282) ~[?:?]
	at com.st.stm32cube.ide.common.services.mx.jar.core.mx.plugin.PlugIn.doExecute(PlugIn.java:329) ~[?:?]
	at com.st.stm32cube.ide.common.services.mx.jar.core.mx.plugin.PlugIn.doGenerate(PlugIn.java:295) ~[?:?]
	at com.st.stm32cube.ide.common.services.mx.jar.core.mx.plugin.PlugInAbstract.generate(PlugInAbstract.java:44) ~[?:?]
	at com.st.stm32cube.ide.common.services.mx.jar.core.mx.plugin.PlugInAbstract.generate(PlugInAbstract.java:32) ~[?:?]
	at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
	... 6 more

 

 

4 REPLIES 4
Kopytko
Associate

PS:

MX version is 6.17.0

IDE version is: 2.1.0

Hello @Kopytko 

Let me thank you for posting.

I am unable to reproduce the behavior described.

The project was generated correctly, and the compilation completed successfully without any errors.

Thanks

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.

Pavel A.
Super User

Traces of devil detected in the log. Spray the machine with holy water!

 

Andrew Neil
Super User

Related: Unable to generate FreeRTOS code after migration ?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.