cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with following STM32WB MOOC Workshop 4: After enabling custom template CubeMX often hangs at code generation, and app_ble.c has error

SWong.1
Associate

Issue with following STM32WB MOOC Workshop 4: After enabling custom template CubeMX often hangs at code generation, and app_ble.c has error.

I have updated CubeMX to latest version (5.6.1), as well as the firmware package for the STM32WB55 (v1.6.0). Attached please see my IOC file and the app_ble.c file in question. These cause me not being able to compile the project.

Note: the code snippet start at line ~363 in attached app_ble.c file.

I know the MOOC material is outdated, but I was not expecting the CubeMX to freeze like this.

/**
 
 * Advertising Data
 
 */
 
uint8_t ad_data[16] = {
 
  2, AD_TYPE_TX_POWER_LEVEL, 0x18 /* -0.15dBm */, //Transmission Power
 
  valueNotSetted, AD_TYPE_SHORTENED_LOCAL_NAME , '0', '1', 'S', 'T', //Shortened name
 
  3, AD_TYPE_APPEARANCE, 0x00, 0x00 /* UNKNOWN_APPEARANCE */,
 
  3, AD_TYPE_ADVERTISING_INTERVAL, 0xA0, 0x
 
Expression res[2] is undefined on line 902, column 176 in stm32_wpan_ble_app_ble_c.ftl.
 
The problematic instruction:
 
----------
 
==> ${res[2]} [on line 902, column 174 in stm32_wpan_ble_app_ble_c.ftl]
 
----------
 
 
 
Java backtrace for programmers:
 
----------
 
freemarker.core.InvalidReferenceException: Expression res[2] is undefined on line 902, column 176 in stm32_wpan_ble_app_ble_c.ftl.
 
	at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
 
	at freemarker.core.Expression.getStringValue(Expression.java:118)
 
	at freemarker.core.Expression.getStringValue(Expression.java:93)
 
	at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
 
	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.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.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:277)
 
	at com.st.microxplorer.codegenerator.CodeEngine.genCode(CodeEngine.java:194)
 
	at com.st.microxplorer.codegenerator.CodeGenerator.generateOutputCode(CodeGenerator.java:3862)
 
	at com.st.microxplorer.codegenerator.CodeGenerator.generateSpecificCode(CodeGenerator.java:3357)
 
	at com.st.microxplorer.codegenerator.CodeGenerator.generateSpecificCodeFile(CodeGenerator.java:1297)
 
	at com.st.microxplorer.codegenerator.CodeGenerator.generateCodeFiles(CodeGenerator.java:1499)
 
	at com.st.microxplorer.codegenerator.CodeGenerator.generateDefaultConfig(CodeGenerator.java:7097)
 
	at com.st.microxplorer.codegenerator.CodeGenerator.generateCode(CodeGenerator.java:1133)
 
	at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.generateCode(ProjectBuilder.java:1768)
 
	at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createCode(ProjectBuilder.java:1636)
 
	at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createProject(ProjectBuilder.java:534)
 
	at com.st.microxplorer.plugins.projectmanager.engine.GenerateProjectThread.run(GenerateProjectThread.java:44)

0 REPLIES 0