Skip to main content
bluenow1896
Associate III
June 10, 2018
Question

Motor control SDK 5.1.0 code generation problem when using STM32CubeMX 4.26.0

  • June 10, 2018
  • 2 replies
  • 1761 views
Posted on June 10, 2018 at 18:16

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

null
This topic has been closed for replies.

2 replies

cedric h1
Visitor II
June 11, 2018
Posted on June 11, 2018 at 09:41

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

If you agree with my answer, please accept it by clicking on 'Accept as solution'.""
bluenow1896
Associate III
June 11, 2018
Posted on June 11, 2018 at 15:48

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

cedric H
Technical Moderator
June 11, 2018
Posted on June 11, 2018 at 16:50

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

Laurent Ca...
Senior III
June 15, 2021

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