cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX 6.10.0 hangs on "Generating user source code..."

Reneb
Associate III

The STM32CubeMX tool (I'm using 6.10.0) continuously hangs after GENERATE CODE on "Generating user source code..."

The STMCubeMX.log file (within the .stm32cubemx directory) shows a java.lang.NullPointerException:

 

2024-02-13 13:36:22,290 [ERROR] CodeEngine:200 - catch error: There are no more files
2024-02-13 13:36:22,290 [ERROR] ProjectBuilder:2205 - 
java.lang.NullPointerException: Cannot invoke "com.st.microxplorer.codegenerator.TemplateFile.getPath()" because "this.template" is null
	at com.st.microxplorer.codegenerator.CodeEngine.genCode(CodeEngine.java:243) ~[STM32CubeMX.exe:?]
	at com.st.microxplorer.codegenerator.CodeGenerator.generateOutputCode(CodeGenerator.java:5673) ~[STM32CubeMX.exe:?]
	at com.st.microxplorer.codegenerator.CodeGenerator.generateMSPCode(CodeGenerator.java:4685) ~[STM32CubeMX.exe:?]
	at com.st.microxplorer.codegenerator.CodeGenerator.generateCodeFiles(CodeGenerator.java:2171) ~[STM32CubeMX.exe:?]
	at com.st.microxplorer.codegenerator.CodeGenerator.generateDefaultConfig(CodeGenerator.java:9768) ~[STM32CubeMX.exe:?]
	at com.st.microxplorer.codegenerator.CodeGenerator.generateCode(CodeGenerator.java:1485) ~[STM32CubeMX.exe:?]
	at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.generateCode(ProjectBuilder.java:2827) ~[?:?]
	at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createCode(ProjectBuilder.java:2202) ~[?:?]
	at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createProject(ProjectBuilder.java:830) ~[?:?]
	at com.st.microxplorer.plugins.projectmanager.engine.GenerateProjectThread.run(GenerateProjectThread.java:61) ~[?:?]

 

 How can this be fixed? Or is there a work around?

 

1 REPLY 1
Reneb
Associate III

Occasionally the hang situation isn't reported with a java.lang.NullPointerException but with a java.io.IOException:

2024-02-13 14:13:49,257 [ERROR] ProjectBuilder:2205 - 
java.io.IOException: There are no more files
	at java.io.WinNTFileSystem.canonicalize0(Native Method) ~[?:?]
	at java.io.WinNTFileSystem.canonicalize(WinNTFileSystem.java:462) ~[?:?]
	at java.io.File.getCanonicalPath(File.java:626) ~[?:?]
	at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:1079) ~[STM32CubeMX.exe:?]
	at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:1038) ~[STM32CubeMX.exe:?]
	at com.st.microxplorer.codegenerator.CodeEngine.genCode(CodeEngine.java:249) ~[STM32CubeMX.exe:?]
	at com.st.microxplorer.codegenerator.CodeGenerator.generateOutputCode(CodeGenerator.java:5673) ~[STM32CubeMX.exe:?]
	at com.st.microxplorer.codegenerator.CodeGenerator.generatePinoutConfigCode(CodeGenerator.java:2761) ~[STM32CubeMX.exe:?]
	at com.st.microxplorer.codegenerator.CodeGenerator.generateCodeFiles(CodeGenerator.java:1798) ~[STM32CubeMX.exe:?]
	at com.st.microxplorer.codegenerator.CodeGenerator.generateDefaultConfig(CodeGenerator.java:9768) ~[STM32CubeMX.exe:?]
	at com.st.microxplorer.codegenerator.CodeGenerator.generateCode(CodeGenerator.java:1485) ~[STM32CubeMX.exe:?]
	at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.generateCode(ProjectBuilder.java:2827) ~[?:?]
	at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createCode(ProjectBuilder.java:2202) ~[?:?]
	at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createProject(ProjectBuilder.java:830) ~[?:?]
	at com.st.microxplorer.plugins.projectmanager.engine.GenerateProjectThread.run(GenerateProjectThread.java:61) ~[?:?]