cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX bug report: error in generating stm32f4xx_it.c

Liviu Ionescu
Associate III
Posted on August 02, 2016 at 18:01

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-bug
3 REPLIES 3
Nesrine M_O
Lead II
Posted on August 03, 2016 at 10:08

Hi Liviu,

I will report this issue to our MX team for checking.

-Syrine-

Sirma Siang
ST Employee
Posted on January 06, 2017 at 12:15

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

Posted on January 06, 2017 at 13:07

great!