AnsweredAssumed Answered

STM32CubeMX 4.26.0 gets stuck when generating code

Question asked by Sven Köhler on Jun 12, 2018
Latest reply on Jun 13, 2018 by Khouloud G

On a project that used to generate code just fine for months, STM32CubeMX now gets stuck. This is happening since an upgrade to version 4.26.0. If it is of any relevance, the project uses the STM32L4 package version 1.8.1.

 

The problem only seems to occur on Windows. On the Linux, STM32CubeMX finishes generating code and doesn't get stuck.

 

The last entry of STM32CubeMX.log is below. Ironically the same error happens on Linux, but CubeMX is able to move past that error. Even more ironic, the file usb_otg_fs_vars.tmp can be found in the folder MXTmpFiles. That's where CubeMX puts it according to the log file, but then cant find it anymore cause it looks for it in the Src folder ... go figure!

 

Given this huge flaw in CubeMX, I really need a way to download previous version: say 4.25.1 or 4.24.0.

Bugs in CubeMX are reported here frequently and I have to rely on downloads provided by third parties! Why?

 

2018-06-12 03:38:50,674 [ERROR] runtime:96 -

Error reading included file Src/usb_otg_fs_vars.tmp
The problematic instruction:
----------
==> include "Src/usb_otg_fs_vars.tmp" [on line 77, column 1 in usbdconf_l4_c.ftl]
----------

Java backtrace for programmers:
----------
freemarker.template.TemplateException: Error reading included file Src/usb_otg_fs_vars.tmp
at freemarker.core.Include.accept(Include.java:167)
at freemarker.core.Environment.visit(Environment.java:208)
at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
at freemarker.core.Environment.visit(Environment.java:208)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:208)
at freemarker.core.Environment.process(Environment.java:188)
at freemarker.template.Template.process(Template.java:237)
at com.st.microxplorer.codegenerator.CodeEngine.freemarkerDo(CodeEngine.java:269)
at com.st.microxplorer.codegenerator.CodeEngine.genCode(CodeEngine.java:190)
at com.st.microxplorer.codegenerator.CodeGenerator.generateOutputCode(CodeGenerator.java:2913)
at com.st.microxplorer.codegenerator.CodeGenerator.generateSpecificCode(CodeGenerator.java:2721)
at com.st.microxplorer.codegenerator.CodeGenerator.generateSpecificCodeFile(CodeGenerator.java:1092)
at com.st.microxplorer.codegenerator.CodeGenerator.generateCodeFiles(CodeGenerator.java:1229)
at com.st.microxplorer.codegenerator.CodeGenerator.generateCode(CodeGenerator.java:935)
at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.generateCode(ProjectBuilder.java:1029)
at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createCode(ProjectBuilder.java:913)
at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createProject(ProjectBuilder.java:444)
at com.st.microxplorer.plugins.projectmanager.engine.GenerateProjectThread.run(GenerateProjectThread.java:41)
Caused by: java.io.FileNotFoundException: Template Src/usb_otg_fs_vars.tmp not found.
at freemarker.template.Configuration.getTemplate(Configuration.java:489)
at freemarker.core.Environment.getTemplateForInclusion(Environment.java:1459)
at freemarker.core.Include.accept(Include.java:157)
... 18 more
2018-06-12 03:38:50,678 [INFO] CodeEngine:279 - [Ljava.lang.StackTraceElement;@31a0a3

Outcomes