2025-11-06 2:03 AM
Hi there,
I was trying to generate a STSPING4 project with MCSDK 5.Y.4.
All the config and pin checks are successful.
However, there is an error in the attached picture; also, the full LOG is attached.
Seems some paths are incorrect, but I don't know how to fix them.
Maybe I need to install something more? Or need to copy some folder somewhere?
Thank you very much.
Solved! Go to Solution.
2025-11-06 6:27 AM
Hello @Junde,
Warnings during generation can be ignored.
For SPEED_LOOP_FREQUENCY_HZ, it is used for CPU load measurement purposes. You can remove mc_perf.c from your project.
If your goal is to use the position control feature, select the encoder signal on TIM2. Dual sensor functionality is not supported in this MCSDK version, which is why SPD_TIM_M1_IRQHandler is defined twice.
2025-11-06 2:11 AM
@Junde wrote:Maybe I need to install something more?
Yes, that does seem to be what the message is telling you:
2025-11-06 2:29 AM
Hello @Junde,
As mentioned in the release note documentation available through Workbench tool > Documentation, required STM32Cube Environment is: STM32CubeMX v6.4.0 and STM32Cube_FW_G4_V1.5.0.
Warnings might appear during project generation. If the generation concludes with the creation of the main.c file, proceed with the project.
2025-11-06 3:45 AM
Thanks for your kind reply. I already installed this version; if not, it will show like "STM32 FW V1.5.0(Recommended, not installed)"
And as @GMA information, MCSDK 5.Y.4 must work with the STM32CubeMx 6.4.0.
2025-11-06 4:07 AM - last edited on 2025-11-06 4:20 AM by Andrew Neil
Hi @GMA
Thanks for your important information.
After installing STM32CubeMx 6.4.0, I can generate the code, but there are also some error messages like "PDSC version is not supported"(refer to the full log in the attachment).
Can I ignore these errors and go ahead?
Although there are some errors, it generates the project.
However, the project compiler has some warnings and errors.
So I modified the source code as below:
// 1. Comment the SPD_TIM_M1_IRQHandler define in parameters_conversion.h, because of the conflict in definitions.
//#define SPD_TIM_M1_IRQHandler TIM2_IRQHandler
//#define SPD_TIM_M1_IRQHandler TIM4_IRQHandler
// 2. Add the header in stm32g4xx_mc_it.c for the LL_EXTI_ReadFlag_0_31() function.
#include "stm32g4xx_ll_exti.h"After editing the code as above, there is one last error saying "../Src/mc_perf.c(158): error: #20: identifier "SPEED_LOOP_FREQUENCY_HZ" is undefined".
Why is SPEED_LOOP_FREQUENCY_HZ not defined? Maybe it can be configured in MCSDK?
Or what's the normal value for the SPEED_LOOP_FREQUENCY_HZ? (My position loop is executed at a frequency of 1KHz, and the PWM is configured as 16KHz)
Thanks for your help!
Edited to apply proper source code formatting - please see How to insert source code for future reference.
2025-11-06 6:27 AM
Hello @Junde,
Warnings during generation can be ignored.
For SPEED_LOOP_FREQUENCY_HZ, it is used for CPU load measurement purposes. You can remove mc_perf.c from your project.
If your goal is to use the position control feature, select the encoder signal on TIM2. Dual sensor functionality is not supported in this MCSDK version, which is why SPD_TIM_M1_IRQHandler is defined twice.
2025-11-06 6:53 AM
Thanks for your detailed explanation.