2018-06-10 09:16 AM
Hello,
I started the experimental work on Motor control SDK 5.1.0, it seems that the code generation have issue when using STM32Cube v4.26.0. The problem is that the generated code/project has missing mc lib to link, which causes the build failure in the SW development IDE, such as IAR, SW4STM32, etc.
Please refer to
https://community.st.com/0D50X00009XkWF5SAN
to find a case of details.Will ST support confirm and address this issue?
One more question is, how the MotorControlWorkbench find the version of STM32CubeMX installed in system? I have a STM32CubeMX 4.26.0 installed in system previously did not been found by MotorControlWorkbench and I have to uninstall and re-install to let MotorControlWorkbench be aware of the installation of STM32CubeMX 4.26.0.
Which version of STM32CubeMX to be suggested to work with Motor control SDK 5.1.0? I have STM32CubeMX of version 4.25.1 installed and when generate code/project for SW4STM32 or TrueStudio, there a c file was missing from project and build will fail. The code/project generation for IAR is fine.
Andy
null2018-06-11 12:41 AM
Dear Andy,
We confirm that we have discovered just after the 5.1.0 release an issue with
STM32Cube v4.26.0. The copy of the lib into the project is now fixed in the 5.1.1 that is already available for download.
Please note that with the latest
STM32Cube v4.26.0, unfortunately the compilation optimization for Atollic/Truestudio is broken, and the project will not be compiled with -Ofast by default. This could be an issue depending on the PWM frequency you want to achieve. Of course, you can change this optimization within TrueStudio, (Project properties : C/C++ Build / Settings / Tool Settings/ C Compiler/ Optimizations / Optimization Level : Optimize for speed -Ofast)
We are waiting a fix from CubeMX team.
> One more question is, how the MotorControlWorkbench find the version of STM32CubeMX installed in system?
It is done thanks to the windows registry
> Which version of STM32CubeMX to be suggested to work with Motor control SDK 5.1.0?
We really advise you to update to 5.1.1. Project generation will be fine for both cube 4.25.1 or 4.26 ( be careful with optimization with TrueStudio)
> I have STM32CubeMX of version 4.25.1 installed and when generate code/project for SW4STM32 or TrueStudio, there a c file was missing from project and build will fail
We are not aware of this issue, could you tell us a bit more about your config ? what files are missing ? could you post your stmcx file ?
regards
Cedric
2018-06-11 08:48 AM
Hi
Cedric
,Thanks for very helpful information. I will try
5.1.1
with MX4.26, see how it works.Mainly I do the evaluation on the hardware platform of X-NUCLEO-IHM07M2, starting with the project of potentiometer from Motor control SDK.
When using CubeMX4.25.1 to generate code/project for TrueStudio or SW4STM32, potentiometer.c in Src/ is in the folder but does not been included in TrueStudio or SW4STM32 project, which causes build fail. The code generation for IAR is fine.
There is another Atollic bug failed build the generated code/project on Windows. The bug is on TrueStudio windows version only. I had reported the bug 2 or 3 weeks ago, and have no further information since then, as the Atollic web site was down for maintenance/integration for over a week. The bug is that the TrueStudio windows version can handle the file path much shorter, which failed to locate either header file or c source file with long path. So the same project gone through build fine on Linux with TrueStudio. SW4STM32 handle this well on both Windows and Linux.
Regards,
-Andy
2018-06-11 09:50 AM
Hi Andy,
Actually in the readme.txt that comes with the potentiometer example, it is specified that you can select either EWARM or MDK-ARM V5.
In the next version, we will add TrueStudio example too, but today in order to use TrueStudio, we
need the HAL version 1.9.1 for the F3 series, and it is available only through a patch from st.com, so it is not so straightforward ...Regards
Cedric
2018-06-11 06:55 PM
Hi
Cedric
,I tried
5.1.1
today and unfortunately it still need manually fix things to make build go through.I tried the project of P-NUCLEO-IHM001/MotorControlKitPotentiometerExample/potentiometer, to generate the code/project with CubeMX4.26.0 for IAR EWB, TrueSTUDIO and SW4STM32. Each of them has at least one problem to prevent build success. The good thing is now I know what/where go wrong for each of cases and I can fix each of them manually.
I thought those problems are easily to reproduce, so I wouldn't provide the details hence.
Let me know if have question to reproduce, I certainly like to help with any details if anyone needs.
Regards,
-Andy
2018-06-13 10:30 AM
Hi Cedric,
I want to bring to you an attention that the MC-SDK 5.1.1 seems not working well as my experience.
I tried the project of P-NUCLEO-IHM001/MotorControlKitPotentiometerExample/potentiometer, from the package, to generate code/project through CubeMX4.26.0, for IAR EWB, and the build from IAR EWB failed. I manually fixed the problem as now I'm be more experienced to know what/where MC-SDK could make things wrong, but still ST should fix it in the future release.
From MC-SDK 5.1.1 , I also tried the same project of P-NUCLEO-IHM001/MotorControlKitPotentiometerExample/potentiometer, with CubeMX4.26.0 to generate the code/project for TrueSTUDIO and SW4STM32, and the build from TrueSTUDIO or SW4STM32 also failed. Again, with the experience from MC-SDK 5.1.0 , I was managed to fix the build manually.
-Andy
2018-06-14 03:15 AM
Hi Andy,
we are planing a 5.1.2 to address these kind of small issues..
For TrueStudio, we are aware of the missing potentiometer.c in the makefile, and the optimization level which is not -Ofast by default. The optimization level will be fixed in the next MX version (4.26.1 ) ( the project is build on demand by cubeMX).
Regarding IAR, we are not aware of any issue, and you wrote in your inital post that the generation is fine. Could you tell us a bit more ?
Thanks a lot for your feedback.
Regards
Cedric
2018-06-14 08:07 AM
Hi Cedric,
Thanks for the information.
Regarding code/project generation for IAR by CubeMX4.26.0 , MCSDK 5.1.0 was fine but MCSDK 5.1.1 has issue. I don't remember the details at this moment but it should be easy and straightforward to reproduce.
In case you find difficult to reproduce, let me know. I'm be in pleasure to help.
Regards,
-Andy
2021-06-15 01:24 AM
The question has been moved from the "Motor Control Hardware" section to the "STM32 Motor Control" section (the question is about the STM32 MC SDK).
Best regards