cancel
Showing results for 
Search instead for 
Did you mean: 

MCSDK5 generate code with err

Junde
Senior III

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.

4 REPLIES 4
Andrew Neil
Super User

@Junde wrote:

Maybe I need to install something more?


Yes, that does seem to be what the message is telling you:

AndrewNeil_0-1762423888495.png

 

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
GMA
ST Employee

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.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA

@Andrew Neil 

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.

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.