cancel
Showing results for 
Search instead for 
Did you mean: 

Firmware generated using MotorWorkbench 6.1.2 doesn't compile

leoSCosta
Associate

I'm trying to generate the firmware for my B-G431B-ESC1 but it doesn't compile in CubeIDE.

Previously I was using the 5.4 version, but I decided to update to 6.1.2 since I saw that it had a better firmware generation. However, There are a lot of errors that seem like a variable has been renamed, for example:

../MCSDK_v6.1.2-Full/MotorControl/MCSDK/MCLib/G4xx/Src/r3_3_g4xx_pwm_curr_fdbk.c:1425:28: error: 'PWMC_Handle_t' {aka 'struct PWMC_Handle'} has no member named 'bMotor'; did you mean 'Motor'?

I have generated all of the files from scratch and only changed the main.c/.h files, so It shouldn't influence on this.

1 ACCEPTED SOLUTION

Accepted Solutions
Gael A
ST Employee

Hello leoSCosta,

r3_3_pwm_curr_fdbk.c is a deprecated file that should not be part of your project. Currently, we support only Single ADC or Dual ADC current sensing (so only r3_1 and r3_2). You can delete the r3_3 file from your CubeIDE project and leave only the one you need depending on your ADC configuration. You can see it in the Current Sensing tab in the WorkBench.

To prevent this from happening in the future, you can try checking the "Copy only the necessary library files" in Project Manager -> Code Generator tab of CubeMX. This will work only when generating project again using CubeMx after generating via Workbench.

Hope this will help,
Gaël A.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

View solution in original post

1 REPLY 1
Gael A
ST Employee

Hello leoSCosta,

r3_3_pwm_curr_fdbk.c is a deprecated file that should not be part of your project. Currently, we support only Single ADC or Dual ADC current sensing (so only r3_1 and r3_2). You can delete the r3_3 file from your CubeIDE project and leave only the one you need depending on your ADC configuration. You can see it in the Current Sensing tab in the WorkBench.

To prevent this from happening in the future, you can try checking the "Copy only the necessary library files" in Project Manager -> Code Generator tab of CubeMX. This will work only when generating project again using CubeMx after generating via Workbench.

Hope this will help,
Gaël A.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.