2016-08-02 09:01 AM
Hi,
If in NVIC Configuration -> Code Generation, none of the IRQ handlers are selected, the generated stm32f4xx_it.c file is not generated, but reads a java backtrace:/* Includes ------------------------------------------------------------------*/
&sharpinclude
''stm32f4xx_hal.h''&sharpinclude
''stm32f4xx.h''&sharpinclude
''stm32f4xx_it.h''Expression requireSystemClockConfig is undefined on line 51, column 8 in stm32xx_it_c.ftl.
The problematic instruction:
----------
==>
if
requireSystemClockConfig [on line 51, column 3 in stm32xx_it_c.ftl]
----------
Java backtrace
for
programmers:
----------
freemarker.core.InvalidReferenceException: Expression requireSystemClockConfig is undefined on line 51, column 8 in stm32xx_it_c.ftl.
at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
at freemarker.core.Expression.isTrue(Expression.java:145)
at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:77)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.Environment.visit(Environment.java:233)
at freemarker.core.CompressedBlock.accept(CompressedBlock.java:73)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.Environment.process(Environment.java:176)
at freemarker.template.Template.process(Template.java:232)
at com.st.microxplorer.codegenerator.CodeEngine.freemarkerDo(CodeEngine.java:225)
at com.st.microxplorer.codegenerator.CodeEngine.genCode(CodeEngine.java:164)
at com.st.microxplorer.codegenerator.CodeGenerator.generateOutputCode(CodeGenerator.java:1707)
at com.st.microxplorer.codegenerator.CodeGenerator.generatePeriphConfigCode(CodeGenerator.java:1026)
at com.st.microxplorer.codegenerator.CodeGenerator.generateCodeFiles(CodeGenerator.java:816)
at com.st.microxplorer.codegenerator.CodeGenerator.generateCode(CodeGenerator.java:555)
at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.generateCode(ProjectBuilder.java:781)
at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createCode(ProjectBuilder.java:688)
at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createProject(ProjectBuilder.java:393)
at com.st.microxplorer.plugins.projectmanager.engine.GenerateProjectThread.run(GenerateProjectThread.java:37)
---The reason for this configuration is a custom SysTick_Handler, that needs to call C++ code, so it cannot be located in a .c file.I'm using 4.16, on macOS.Regards,Liviu #cubemx-bug2016-08-03 01:08 AM
Hi Liviu,
I will report this issue to our MX team for checking.-Syrine-2017-01-06 03:15 AM
Hello Liviu,
This has been reproduced on Windows and Macbook machines.
I confirm that this will be solved using Cube version 4.19.
KR
Sirma
2017-01-06 05:07 AM
great!