Skip to main content
greffeb
Associate II
June 20, 2025
Solved

STM32CubeMX 6.14 stuck generating code & STM32CubeIDE 1.18 won't generate code

  • June 20, 2025
  • 4 replies
  • 830 views

Hardware: STM32L071CZTX
Software Versions:

  • STM32CubeMX 6.14
  • STM32CubeIDE 1.18

Problem Description:

I'm experiencing code generation issues with both Cube software tools on an existing STM32L071CZTX project:

Issue 1 - STM32CubeMX 6.14:

  • Code generation process gets stuck and becomes unresponsive
  • Only way to terminate is through Task Manager (killing OpenJDK Platform binary process)

Issue 2 - STM32CubeIDE 1.18:

  • Code generation fails when modifying clock parameters
  • No code is generated after clock configuration changes

Steps Already Taken:

  • Performed complete uninstallation of all STM32 software
  • Fresh installation using newly downloaded files from ST website
  • Verified MyST account login on both applications

Request: Has anyone encountered similar issues with these software versions? Any guidance on resolving these code generation problems would be greatly appreciated.

Thank you for your assistance.

 
Best answer by greffeb

I don't know if it was the issue but i moved the project directory from a virtual google drive G: to the C: hard disk and i could go back to a working state. IDK why it worked untill now.

i had to generate a new project from the .ioc file using CubeIDE and import all my code back into the new project.

the same operation under the G: drive did not work

 

4 replies

Ghofrane GSOURI
Technical Moderator
June 20, 2025

Hello @greffeb 

Could you please provide more details about your OS.

I used CubeMX 6.14.1 and CubeIDE 1.18.1 and everything is working correctly.

GhofraneGSOURI_0-1750413987962.png

 

THX

Ghofrane

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.
greffeb
greffebAuthor
Associate II
June 20, 2025

here are my specs : 

  • OS: Windows 11 Professional (Build 22631)
  • Computer: Dell XPS 15 9560 laptop
  • Processor: Intel Core i7-7700HQ @ 2.80GHz (4 cores, 8 threads)
  • RAM: 16 GB
  • BIOS: Dell version 1.24.0 from October 2021

CubeIDE and CubeMX works on a fresh project

i have some .ftl files laying arount my project root, deleting them (and the MXTmpFiles) does not fix my problem. however, they come back after another generation tentative.

greffeb_0-1750422182662.png


another test i did was to regenerate a new project from my .ioc but cubeMX was denied access to the C:/ drive

greffeb_1-1750423178047.png 

so i tried running as administrator. this fixes the issue for the new project generation but not updating my existing one.


 

 

 

Associate III
June 20, 2025

How is your RAM and CPU usage while performing those tasks?

greffeb
greffebAuthor
Associate II
June 20, 2025

Nothing out of the ordinary

Associate II
July 2, 2025

Hello,

I'm experiencing a similar issue:

https://community.st.com/t5/stm32cubemx-mcus/stm32cubemx-freezes-during-code-generation/td-p/818146

I'm not sure if this is the cause of the freeze, but I found an error in the MX log.

C:\Users\<My Account>\.stm32cubemx\STM32CubeMX.log

...

2025-07-02 11:50:30,696 [ERROR] CodeEngine:432 -
java.io.UnsupportedEncodingException: UFT-8
at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:79) ~[?:?]
at java.io.InputStreamReader.<init>(InputStreamReader.java:111) ~[?:?]
at freemarker.cache.FileTemplateLoader$4.run(FileTemplateLoader.java:210) ~[STM32CubeMX.exe:?]
at freemarker.cache.FileTemplateLoader$4.run(FileTemplateLoader.java:202) ~[STM32CubeMX.exe:?]
at java.security.AccessController.doPrivileged(AccessController.java:571) ~[?:?]
at freemarker.cache.FileTemplateLoader.getReader(FileTemplateLoader.java:202) ~[STM32CubeMX.exe:?]
at freemarker.cache.MultiTemplateLoader$MultiSource.getReader(MultiTemplateLoader.java:147) ~[STM32CubeMX.exe:?]
at freemarker.cache.MultiTemplateLoader.getReader(MultiTemplateLoader.java:105) ~[STM32CubeMX.exe:?]
at freemarker.cache.TemplateCache.loadTemplate(TemplateCache.java:547) ~[STM32CubeMX.exe:?]
at freemarker.cache.TemplateCache.getTemplateInternal(TemplateCache.java:439) ~[STM32CubeMX.exe:?]
at freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:292) ~[STM32CubeMX.exe:?]
at freemarker.template.Configuration.getTemplate(Configuration.java:2822) ~[STM32CubeMX.exe:?]
at freemarker.template.Configuration.getTemplate(Configuration.java:2671) ~[STM32CubeMX.exe:?]
at com.st.microxplorer.codegenerator.CodeEngine.freemarkerDo(CodeEngine.java:410) ~[STM32CubeMX.exe:?]
at com.st.microxplorer.codegenerator.CodeEngine.genCode(CodeEngine.java:271) ~[STM32CubeMX.exe:?]
at com.st.microxplorer.codegenerator.CodeGenerator.generateOutputCode(CodeGenerator.java:6373) ~[STM32CubeMX.exe:?]
at com.st.microxplorer.codegenerator.CodeGenerator.generateLicenceText(CodeGenerator.java:9717) ~[STM32CubeMX.exe:?]
at com.st.microxplorer.codegenerator.CodeGenerator.generateCodeFiles(CodeGenerator.java:1942) ~[STM32CubeMX.exe:?]
at com.st.microxplorer.codegenerator.CodeGenerator.generateDefaultConfig(CodeGenerator.java:10860) ~[STM32CubeMX.exe:?]
at com.st.microxplorer.codegenerator.CodeGenerator.generateCode(CodeGenerator.java:1583) ~[STM32CubeMX.exe:?]
at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.generateCode(ProjectBuilder.java:3061) ~[?:?]
at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createCode(ProjectBuilder.java:2223) ~[?:?]
at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createProject(ProjectBuilder.java:818) ~[?:?]
at com.st.microxplorer.plugins.projectmanager.engine.GenerateProjectThread.run(GenerateProjectThread.java:61) ~[?:?]
2025-07-02 11:50:30,702 [INFO] CodeEngine:287 - Generated code: C:\Projects\STM\test207\MXTmpFiles\license.tmp
2025-07-02 11:50:30,860 [ERROR] ProjectBuilder:2226 -
java.io.IOException: Can't delete C:\Projects\STM\test207\BSD_License.ftl
at com.st.components.util.FilesUtils.delete(FilesUtils.java:34) ~[STM32CubeMX.exe:?]
at com.st.microxplorer.codegenerator.CodeEngine.genCode(CodeEngine.java:301) ~[STM32CubeMX.exe:?]
at com.st.microxplorer.codegenerator.CodeGenerator.generateOutputCode(CodeGenerator.java:6373) ~[STM32CubeMX.exe:?]
at com.st.microxplorer.codegenerator.CodeGenerator.generateLicenceText(CodeGenerator.java:9717) ~[STM32CubeMX.exe:?]
at com.st.microxplorer.codegenerator.CodeGenerator.generateCodeFiles(CodeGenerator.java:1942) ~[STM32CubeMX.exe:?]
at com.st.microxplorer.codegenerator.CodeGenerator.generateDefaultConfig(CodeGenerator.java:10860) ~[STM32CubeMX.exe:?]
at com.st.microxplorer.codegenerator.CodeGenerator.generateCode(CodeGenerator.java:1583) ~[STM32CubeMX.exe:?]
at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.generateCode(ProjectBuilder.java:3061) ~[?:?]
at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createCode(ProjectBuilder.java:2223) ~[?:?]
at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createProject(ProjectBuilder.java:818) ~[?:?]
at com.st.microxplorer.plugins.projectmanager.engine.GenerateProjectThread.run(GenerateProjectThread.java:61) ~[?:?]

Thanks!

 

Explorer
November 12, 2025

I had the same issue for three months already, which caused my cubemx code generation malfunction. Here's the issue: 

ReallyWantIT_0-1762960919194.png

The solution: find the file on the right named below

ReallyWantIT_3-1762961633884.png

Type in the last line. 

OR: type in same line but replace GBK to UTF-8.

ReallyWantIT_1-1762961241934.png

I don't know how exactly this problem occur. According the online information, it seemd that the compiler detect wrong code"UTR-8s", which should be "UTR-8". Here's relative information in the mannual of CubeIDE:

ReallyWantIT_2-1762961534271.png

 

 

Explorer
November 12, 2025

My problem above is the same as 

"Issue 1 - STM32CubeMX 6.14:

  • Code generation process gets stuck and becomes unresponsive
  • Only way to terminate is through Task Manager (killing OpenJDK Platform binary process)"
greffeb
greffebAuthorBest answer
Associate II
July 7, 2025

I don't know if it was the issue but i moved the project directory from a virtual google drive G: to the C: hard disk and i could go back to a working state. IDK why it worked untill now.

i had to generate a new project from the .ioc file using CubeIDE and import all my code back into the new project.

the same operation under the G: drive did not work