2024-11-05 12:06 AM
Hi,
First time for me with this kind of board and ST IDEs, I need help to start the project.
The drivers are ok, I can connect the board with STM32CubeProgrammer (ST-Link).
I made a project with MC Workbench, the code is generated with no errors.
But : I don't know how to program the device. I only have .c files, and In the "Erasing & Programming" (STM32CubeProgrammer) I need to put an hex or bin file.
I miss a step, I don't know witch one.
Can someone tell me how to continue ?
I guess that after programming the STM, I'll be able to communicate and use the motor pilot and profiler.
Regards.
2024-11-08 07:52 AM
2024-11-08 07:59 AM
2024-11-08 08:01 AM
And this, don't know if it helps ...
FreeMarker template error (DEBUG mode; use RETHROW in production!):
Template inclusion failed (for parameter value "*/ftl/header.ftl":(
Template not found for name "*/ftl/header.ftl".
The name was interpreted by this TemplateLoader: MultiTemplateLoader(loader1 = FileTemplateLoader(baseDir="C:\Users\ulrich\STM32CubeIDE\workspace_1.15.0\TEST_STWB_241108", canonicalBasePath="C:\Users\ulrich\STM32CubeIDE\workspace_1.15.0\TEST_STWB_241108\"), loader2 = FileTemplateLoader(baseDir="C:\Users\ulrich\STM32CubeIDE\workspace_1.15.0\TEST_STWB_241108", canonicalBasePath="C:\Users\ulrich\STM32CubeIDE\workspace_1.15.0\TEST_STWB_241108\"), loader3 = FileTemplateLoader(baseDir="C:\ST\STM32CubeIDE_1.15.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.11.0.202403141607\db\templates", canonicalBasePath="C:\ST\STM32CubeIDE_1.15.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.11.0.202403141607\db\templates\")).
----
FTL stack trace ("~" means nesting-related):
- Failed at: #include "*/ftl/header.ftl" [in template "aspep.c.ftl" at line 2, column 1]
----
Java stack trace (for programmers):
----
freemarker.core._MiscTemplateException: [... Exception message was already printed; see it above ...]
at freemarker.core.Include.accept(Include.java:164)
at freemarker.core.Environment.visit(Environment.java:334)
at freemarker.core.Environment.visit(Environment.java:340)
at freemarker.core.Environment.process(Environment.java:313)
at freemarker.template.Template.process(Template.java:383)
at com.st.microxplorer.codegenerator.CodeEngine.freemarkerDo(CodeEngine.java:410)
at com.st.microxplorer.codegenerator.CodeEngine.genCode(CodeEngine.java:263)
at com.st.microxplorer.codegenerator.CodeGenerator.generateOutputCode(CodeGenerator.java:5818)
at com.st.microxplorer.codegenerator.CodeGenerator.generateSpecificCode(CodeGenerator.java:4855)
at com.st.microxplorer.codegenerator.CodeGenerator.generateSpecificCodeFile(CodeGenerator.java:1724)
at com.st.microxplorer.codegenerator.CodeGenerator.generateCodeFiles(CodeGenerator.java:1995)
at com.st.microxplorer.codegenerator.CodeGenerator.generateDefaultConfig(CodeGenerator.java:10016)
at com.st.microxplorer.codegenerator.CodeGenerator.generateCode(CodeGenerator.java:1485)
at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.generateCode(ProjectBuilder.java:2914)
at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createCode(ProjectBuilder.java:2166)
at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createProject(ProjectBuilder.java:794)
at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createProject(ProjectBuilder.java:586)
at com.st.microxplorer.plugins.projectmanager.engine.MainProjectManager.startGenerateCode(MainProjectManager.java:1433)
at com.st.stm32cube.common.mx.editor.CubeMxEditor.doGenerate(CubeMxEditor.java:2577)
at com.st.stm32cube.common.mx.editor.CubeMxEditor$22.run(CubeMxEditor.java:2282)
at com.st.stm32cube.common.mx.oss.core.awtswtbridge.AwtEnvironment$2.run(AwtEnvironment.java:166)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: freemarker.template.TemplateNotFoundException: Template not found for name "*/ftl/header.ftl".
The name was interpreted by this TemplateLoader: MultiTemplateLoader(loader1 = FileTemplateLoader(baseDir="C:\Users\ulrich\STM32CubeIDE\workspace_1.15.0\TEST_STWB_241108", canonicalBasePath="C:\Users\ulrich\STM32CubeIDE\workspace_1.15.0\TEST_STWB_241108\"), loader2 = FileTemplateLoader(baseDir="C:\Users\ulrich\STM32CubeIDE\workspace_1.15.0\TEST_STWB_241108", canonicalBasePath="C:\Users\ulrich\STM32CubeIDE\workspace_1.15.0\TEST_STWB_241108\"), loader3 = FileTemplateLoader(baseDir="C:\ST\STM32CubeIDE_1.15.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.11.0.202403141607\db\templates", canonicalBasePath="C:\ST\STM32CubeIDE_1.15.0\STM32CubeIDE\plugins\com.st.stm32cube.common.mx_6.11.0.202403141607\db\templates\")).
at freemarker.template.Configuration.getTemplate(Configuration.java:2869)
at freemarker.core.Environment.getTemplateForInclusion(Environment.java:2883)
at freemarker.core.Include.accept(Include.java:162)
... 33 more
2024-11-08 08:25 AM
Hello @Alex10,
From you last log, the directory "TEST_STWB_241108/ftl" is missing. This directory is generated by the Workbench, then it means that you have to use it at least once.
Could you load your .ioc file in Motor Control Workbench tool, generate the project with it and check that "TEST_STWB_241108/ftl" has been correctly generated and not empty?
2024-11-11 11:41 PM
Hi GMA,
The directory "TEST_STWB_241108/ftl" was created (before opening and generating with the .ioc file), and not empty (see attachment).
I tryed with your recommendations (open and generate with the .ioc), same issue.
I tryed with my own computer at home too (until now I was using my office computer, with only basic user rights) : I have some java issues, but about 600 errors during compilation too.
Question : In cubeStIDE, do I have to open the ioc file or is there an other way to open and create the project ?
Regards.
2024-11-12 12:17 AM
Just tryed with my laptop, same issue 1193 erros.
My own computer : 593 errors
Office computer : 893 errors
Laptop : 1193 errors
Something with the softwares installation ?
Regards
2024-11-12 03:10 AM
Ok found !
STWB : generate code and run MX
CubeMX : generate code and run IDE
Cude IDE : compile and debug ...
Simple, but if you don' know ...
So importing an ioc file is not the rignt way !!
Regards.
2024-11-12 03:19 AM
Hello Alex10,
I am glad that you found a solution to your answer, however, there is an extra step that you should not need to do in what you said.
When generating code with STWB, CubeMx is already ran and the output should be a working MC project, so you don't need to launch CubeMx unless you want to add features that the MCSDK does not provide. Usually, after STWB generation, opening the folder and launching the IDE is the next step.
If that is not the case, and that your project is not working just after STWB generation, could you then provide your .stwb6 (converted to .txt) so that we can have a look at what is potentially going wrong ?
2024-11-12 06:50 AM
Hi Gael,
Here is the .stwb6 file, I have to execute the "generate code" in MX and then "open in IDE" to make it work.
And now it works, I can connect and controle with the Motor Pilot.
But I have new questions :
- I've created a custom motor (12V 15Apk 1.075Vrms/kRPM). It works but I have current problems at start. Maybe because in the Motor Pilot the nominal current is 2.160A. How can I change that ?
- I want to plug a quadratic encoder. Do you confirme that I have to open JP8-9-10 and close JP5-6-7 ?
- Is it possible to have a stand alone mode (without Motor pilot) and controle the speed with R6 (pot) ? I know that USER1 PB is start/stop.
Regards