2025-08-15 12:55 PM
Greetings,
I am very new to ST MCU development, but not new to embedded development. I've developed professionally on Microchip, Qorvo,,and Renesys for the last 20 years.
I am working on bringing up the kit in title. I was successful in generating compiled code for the ElectronicSpeedControl_ESC-G4 project in ST Motor Workbench 6.4. I am working with the latest tools from your website. I did use the stand alone Motor Profiler tool (v5.4) to run a profile on a drone motor successfully, but I quickly realized that it generated XML files for profiles. I figured out that the new version of MP was embedded in WB and produced JSON files. So I proceeded down that path. I could connect the kit to the newest version of MP, but it said I need a "Profiler" version of FW on my kit. I had downloaded the compiled non-Profiler version.
This is where it went off the rails. When created a brand new project with the kit and a 24V motor selected from the default group of motors and I checked the Motor Profiler box before generating code I got two very different projects between the first project I did based on the example project mentioned above and the one I created new with the Motor Profiler box checked. Very different when viewed in the IDE. I have enclosed some of pics of the results.
Any idea what's happening? The project structure is very different in the "motor control" area. Tons of errors. Trying to not hunt down and fix all these errors. Why is so different? What am I missing? Need developer help.
2025-08-15 6:50 PM
I did not completely understand the problem, but the project will look as below
So in your image the first one seems to be the correct one.
2025-08-16 8:25 AM
Thank you for your reply. The top project is from a built-in example in Workbench that compiles with no errors and the bottom was generated from a new WB project where I chose the discovery kit and the 24V Shinano motor and gave it a unique name and created it. Then I generated code in Workbench and the bottom project is the result. I suspect there's some settings when creating a new project vs using one of the examples. I suppose diff checking the two ioc files might reveal the culprit.
I was trying to follow the Motor Profiler FW guide as close as possible to convert the top project to Motor Profiler compatibility.
I'm old school and haven't messed with code generators much.
On a side note, what's the difference between creating a project and generating in WB vs CubeMX?
Thanks for all your help.
2025-08-18 6:04 AM
Hello @Rescuedan,
Did you review the Motor Profiler application note available through Workbench tool > About > Documentations > Documentation > User manual?
The MCSDK project must be generated from the Workbench tool and from an empty directory. It appears that your second firmware generation attempt was performed using the STM32CubeMX tool.
Although it is not currently documented (this will be added in future documentation updates), avoid using the Stage Configuration/ESC feature and the Application Configuration/Motor Profiler simultaneously.
2025-08-18 7:25 AM
Hello @GMA,
Thanks for your reply. I was using the the Motor Profiler FW document that covers how to build an existing project to enable a project to be used with the Motor Profiler. I didn't read the whole User Manual yet. I will do that this week.
In reference to "generated from an empty directory" can you clarify which directory? I am generating in the ".st_workbench/projects" folder. Should I generate code for different projects files into different folders outside of the projects folder? Different IDE workspace maybe?
Does Stage Configuration/ESC set the build to use the PWM input on J3 of the Discovery Kit instead of UART?
I should probably read the user manual...
I really appreciate your help.
Thanks,
2025-08-18 9:31 AM
Hello @Rescuedan,
For "generated from an empty directory," ensure that you do not use a directory where an MCSDK project has already been created.
Once a project is created, the full pin usage description is available in the following tab:
Refer to Electronic Speed Controller user manual for more detail.