2019-08-20 01:37 AM
The motor control workbench seems to only want to use the standalone STM32CUBEMX tool and not the integrated version included with the STM32CUBEIDE.
Bottom line, how do I get a motor control workbench out into the new STM32CUBEIDE as a project.
I have tried my local official support ST team but they have no idea on motor control development. Dissapointing.
2019-10-11 01:42 PM
Dale, Did you ever figure out a work-around for this code generation issue?
I recently started working with MC SDK 5.41 and IDE 1.02 to generate code for the P-Nucleo-IMH001 kit (Nucleo-F302R8 mcu board). As you stated, the MC workbench will generate the code, but it does not generate the Eclipse .cproject file .settings and Startup folders, so if you import the project into the Eclipse based IDE, it doesn't know how to compile the code. I get this same result if I generate code for the STM32CubeIDE for the Nucleo-F302R8 board from within STM32CubeMX, so there is a disconnect between MC, MX and the IDE.
I'm trying to compile by taking a .cproject and .project files from another STM32 project generate for the same mcu target in the IDE,, but it is also requiring updates to the source, include and library paths under the project Paths and Symbols to included the MC SDK motor control libraries. I'm down to 3 errors and 23 warnings.
Once I get ready to ro run this on the target, I'll need the %target%_FLASH.ld file and STARTUP folder.
I'm hoping for a better solution, else maybe I'll have to switch to a better supported IDE's.
2019-10-15 11:55 AM
Please have a try relying on today st.com released STM32CubeMX 5.4.0 and STM32CubeIDE 1.1.0 products. Such in sync. with MC SDK 5.4.1 should allow you to enjoy motor control Workbench capabilities. MC SDK & STM32CubeMX pair should allow you to perform your first project code generation. Selecting STM32CubeIDE as target toolchain is creating for you a project dedicated to STM32CubeIDE import. Once imported within STM32CubeIDE you'll be obviously able to rely only on IDE taking benefit of STM32CubeMX integration.
2019-10-15 12:33 PM
Another update? Sheesh, I just downloaded IDE 1.0.2 MCSDK 5.4.1 and CubeMX 5.3.0 last Friday. I just spent the whole day and I finally got the code generated from the Motor Controller Workbench (MCW) for the STM32CoreIDE to compile. The following items may be fixed in CubeMX 5.4 and CubeIDE 1.1.0, but I found the following issues:
1) Installation order matters, MX, then IDE, then you gotta run CubeMX before installing motor controller workbench (MCW).
2) The MCW code generation and subsequent import into STMCubeIDE includes TEMPLATE files into the build which causes multiple definitons problems. I had to manually remove all of the TEMPLATES from the build;
3) The import into STMCubeIDE includes ALL of the MC_SDK source files, whether you need them or not. This causes compile problems. I was able to do the code generation for the KEIL target and then use the KEIL MDK-ARM/*.uvprojx project file to figure out which of the MC SDK files were actually required. I just deleted the other MC_SDK files from the CubeIDE space since these files are duplicated elsewhere.
I figure that the STMCubeIDE is the way forward, so I'm trying to avoid messing with IAR, Keil, SW4STM32, TrueStudio and the others. It's just a bit more difficult to get up to speed on the motor control application when I have to fight with the code generation process.
Oh, one additional issue I had, had to do with the CMSIS and the __FPU_PRESENT macro. I had to add the target stm32F302x8.h include file to main.h to get this macro define to avoid compiler errors with the CMSIS. I've read that this is a known issue, but I still had to figure that out.
One question that I still have is with the Motor Control Library (*.lib files). There is no separation between the include files for the .lib and the non-library files that were generated from the MotorControl Workbench. For example MCCSDK/MCLib/Any/Inc/sto_pll_speed_pos_fdbk.h is in the same folder as pcf.h, for which there is a source file pcf.c. So it would be nice to have a simple list of the include files specifically related to the libmc-gcc-M*.lib files. I can look at the Windows MCSDKFirmware.chm documentation file to figure this out, but a simple readme text file would suffice.