cancel
Showing results for 
Search instead for 
Did you mean: 

Project generated for STEVAL-SPIN3201 does not compile in STMCubeIDE

PThiering
Associate II

Dear STM Community,

I'm familiar with the STM32CubeMX and the STM32CubeIDE, and I began discovering a motor control evaluation kit.

The default project generated with the motor control SDK does not compile with default settings (even without touching an option), even though Cube was able to generate a project, and switched miiediately to the IDE. Most of the files were missing, so I had to manually re-import the whole directory structure, and adding all folders with header files in. I never experienced such a problem with a project directly created with the CubeMX.

I've updated all STM tools to the latest version, tried to remove and re-download some STM firmware packages, I got further in the compile process, and stuck at a missing speed_duty_ctrl.h header, awhich I was not able to locate on my computer.

In the Motor Control Workbench, I selected STM32CubeIDE as target platform, with matching version numbers for the CubeMX.

STM32CubeIDE version: 2.0.0
STM32CubeMX version: 6.15.0
Motor Control Workbench version: 6.4.1

Latest compile error log:

In file included from ../MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Src/profiler.c:24:
C:/a/STEVAL_SPIN3201_TEST/MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Inc/profiler.h:30:10: fatal error: profiler_types.h: No such file or directory
   30 | #include "profiler_types.h"
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ../MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Src/mcptl.c:21:
C:/a/STEVAL_SPIN3201_TEST/MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Inc/mcptl.h:35:69: error: unknown type name 'uint8_t'
   35 | typedef bool (* MCTL_GetBuf)(MCTL_Handle_t *pHandle, void **buffer, uint8_t syncAsync);
      |                                                                     ^~~~~~~
C:/a/STEVAL_SPIN3201_TEST/MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Inc/mcptl.h:28:1: note: 'uint8_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?
   27 | #include <stdbool.h>
  +++ |+#include <stdint.h>
   28 | 
C:/a/STEVAL_SPIN3201_TEST/MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Inc/mcptl.h:36:18: error: expected declaration specifiers or '...' before '*' token
   36 | typedef uint8_t (* MCTL_SendPacket)(MCTL_Handle_t *pHandle, void *txBuffer, uint16_t txDataLength, uint8_t syncAsync);
      |                  ^
C:/a/STEVAL_SPIN3201_TEST/MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Inc/mcptl.h:37:9: error: unknown type name 'uint8_t'
   37 | typedef uint8_t *(* MCTL_RXpacketProcess)(MCTL_Handle_t *pHandle, uint16_t *packetLength);
      |         ^~~~~~~
C:/a/STEVAL_SPIN3201_TEST/MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Inc/mcptl.h:37:67: error: unknown type name 'uint16_t'
   37 | typedef uint8_t *(* MCTL_RXpacketProcess)(MCTL_Handle_t *pHandle, uint16_t *packetLength);
      |                                                                   ^~~~~~~~
C:/a/STEVAL_SPIN3201_TEST/MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Inc/mcptl.h:37:67: note: 'uint16_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?
C:/a/STEVAL_SPIN3201_TEST/MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Inc/mcptl.h:49:3: error: unknown type name 'uint8_t'
   49 |   uint8_t *buffer;
      |   ^~~~~~~
C:/a/STEVAL_SPIN3201_TEST/MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Inc/mcptl.h:50:3: error: unknown type name 'uint16_t'
   50 |   uint16_t length;
      |   ^~~~~~~~
C:/a/STEVAL_SPIN3201_TEST/MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Inc/mcptl.h:63:3: error: unknown type name 'MCTL_GetBuf'
   63 |   MCTL_GetBuf fGetBuffer;
      |   ^~~~~~~~~~~
C:/a/STEVAL_SPIN3201_TEST/MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Inc/mcptl.h:64:3: error: unknown type name 'MCTL_SendPacket'
   64 |   MCTL_SendPacket fSendPacket;
      |   ^~~~~~~~~~~~~~~
C:/a/STEVAL_SPIN3201_TEST/MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Inc/mcptl.h:65:3: error: unknown type name 'MCTL_RXpacketProcess'
   65 |   MCTL_RXpacketProcess fRXPacketProcess;
      |   ^~~~~~~~~~~~~~~~~~~~
C:/a/STEVAL_SPIN3201_TEST/MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Inc/mcptl.h:66:3: error: unknown type name 'uint16_t'
   66 |   uint16_t txSyncMaxPayload;
      |   ^~~~~~~~
C:/a/STEVAL_SPIN3201_TEST/MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Inc/mcptl.h:67:3: error: unknown type name 'uint16_t'
   67 |   uint16_t txAsyncMaxPayload;
      |   ^~~~~~~~
make: *** [MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Src/subdir.mk:154: MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Src/profiler.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Src/subdir.mk:154: MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Src/mcptl.o] Error 1
In file included from C:/a/STEVAL_SPIN3201_TEST/MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Inc/otf_sixstep.h:32,
                 from ../MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Src/otf_sixstep.c:51:
C:/a/STEVAL_SPIN3201_TEST/MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Inc/revup_ctrl_sixstep.h:33:10: fatal error: speed_duty_ctrl.h: No such file or directory
   33 | #include "speed_duty_ctrl.h"
      |          ^~~~~~~~~~~~~~~~~~~
In file included from C:/a/STEVAL_SPIN3201_TEST/MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Inc/ipd_sixstep.h:32,
                 from ../MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Src/ipd_sixstep.c:51:
C:/a/STEVAL_SPIN3201_TEST/MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Inc/revup_ctrl_sixstep.h:33:10: fatal error: speed_duty_ctrl.h: No such file or directory
   33 | #include "speed_duty_ctrl.h"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
compilation terminated.
make: *** [MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Src/subdir.mk:154: MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Src/otf_sixstep.o] Error 1
make: *** [MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Src/subdir.mk:154: MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Src/ipd_sixstep.o] Error 1
../MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Src/esc.c: In function 'TIM2_IRQHandler':
../MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Src/esc.c:604:3: error: 'ESC_M1' undeclared (first use in this function); did you mean 'ESC_H'?
  604 |   ESC_M1.Ton_value = esc_capture_filter(&ESC_M1, LL_TIM_OC_GetCompareCH2(TIM2));
      |   ^~~~~~
      |   ESC_H
../MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Src/esc.c:604:3: note: each undeclared identifier is reported only once for each function it appears in
make: *** [MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Src/subdir.mk:154: MCSDK_v6.4.1-Full/MotorControl/MCSDK/MCLib/Any/Src/esc.o] Error 1
"make -j12 all" terminated with exit code 2. Build might be incomplete.

10:08:26 Build Failed. 21 errors, 0 warnings. (took 8s.212ms)

 

3 REPLIES 3
Esakkimuthu
Associate II

Hi @PThiering 
Once you have set all parameters in MC Workbench, and you proceed with Save & Generate, the tool will ask you to select a Firmware Package version.

You should normally choose the recommended version shown by the Workbench, because this is the version that has been tested and validated with your selected MCU, power board, and motor control features. Using the recommended package helps avoid compatibility or build issues.

If you are using an older project or want to test a newer firmware package, you can select a different version — but the safest option is always the recommended one.

Esakkimuthu_0-1763718029221.png

 

PThiering
Associate II

Hi, thanks for the tip. I always selected the "recommended" version, in my case, it was always matching the version installed in cubeMX.
See you later!

After making an empty project, with this settings, the same almost empty file system showed up in the IDE, without manually re-importing all subfolders. What is Your recommendation?

 

 

PThiering_0-1763720693914.png

PThiering_1-1763720908477.png

PThiering_2-1763721098114.png