cancel
Showing results for 
Search instead for 
Did you mean: 

Why is esc.h not being included when compiling the example program for the B-G431B-ESC1 in CubeIDE?

brocolli_rob
Associate

I have the example ElectronicSpeedControl code Generated by the Motor Control Workbench. I then open the .ioc in CubeMX and the just hit Generate. Then, I import this project using File->Open Project from FileSystem. This works fine too, but then when building, it complains about not being about to find esc_boot or esc_pwm_control. I can see that those files are in the ../Inc folder of the project, but CubeIDE isn't able to find them.

However, if I just start a new project from the Motor Control Workbench and repeat the same steps with a blank template project for the B-G431B-ESC1, then that is able to compile and be flashed.

Why is the CubeIDE not seeing or recognizing those files that are present in the same folder that other header files are able to be found in without a problem?

Thanks!

2 REPLIES 2
cedric H
ST Employee

Hello,

CubeIDE supports the motor control project from the version 1.1.0. This version has been released after the MCSDK 5.4.1.

A new version MCSDK 5.4.2 is in publishing phase on st.com (should be online pretty soon). It will fully support cubeIDE and the esc.c file will be automatically part of the files to be compiled. Do not forget to click on update button instead of generate, otherwise the PWM input will not be configured.

If you start a new project from the Motor control workbench, you will not configure the PWM input, and you will not be able to control the speed based on the duty cycle of the PWM input. Of course, you will still have the workbench monitor to change the speed through the UART (over USB) interface

This is the main difference with the example project. In the example project, we provide an IOC with the PWM input properly configured, and we changed the main.c file to call some function implemented esc.c .

Regards

Cedric

Laurent Ca...
Lead II

The question has been set only to the "STM32 Motor Control" topic (the question is only about the STM32 MC SDK). 

Best regards