2023-08-21 07:12 AM - edited 2023-08-21 07:14 AM
After following all procedure I am able to generate code, But with some errors. After Loading IOC file in CubeIDE. during build I am Getting this error: stm32g4xx_ll_opamp.h: No such file.
MC SDK V 6
CubeIDE Latest
Selected existing example of B-G431-ESC1, I have this kit and want to control speed of motor using Potentiometer
Logs:
19:31:14 **** Build of configuration Debug for project ElectronicSpeedControl_ESC-G4 ****
make -j4 all
arm-none-eabi-gcc "../MotorControl/App/motorcontrol.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32G431xx -c -I../MotorControl/App -I../MotorControl -I../Core/Inc -I../Drivers/STM32G4xx_HAL_Driver/Inc -I../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I../MCSDK_v6.1.2-Full/MotorControl/MCSDK/MCLib/Any/Inc -I../MCSDK_v6.1.2-Full/MotorControl/MCSDK/MCLib/G4xx/Inc -I../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I../Drivers/CMSIS/Include -Ofast -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"MotorControl/App/motorcontrol.d" -MT"MotorControl/App/motorcontrol.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "MotorControl/App/motorcontrol.o"
arm-none-eabi-gcc "../MotorControl/aspep.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32G431xx -c -I../MotorControl/App -I../MotorControl -I../Core/Inc -I../Drivers/STM32G4xx_HAL_Driver/Inc -I../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I../MCSDK_v6.1.2-Full/MotorControl/MCSDK/MCLib/Any/Inc -I../MCSDK_v6.1.2-Full/MotorControl/MCSDK/MCLib/G4xx/Inc -I../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I../Drivers/CMSIS/Include -Ofast -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"MotorControl/aspep.d" -MT"MotorControl/aspep.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "MotorControl/aspep.o"
arm-none-eabi-gcc "../MotorControl/mc_api.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32G431xx -c -I../MotorControl/App -I../MotorControl -I../Core/Inc -I../Drivers/STM32G4xx_HAL_Driver/Inc -I../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I../MCSDK_v6.1.2-Full/MotorControl/MCSDK/MCLib/Any/Inc -I../MCSDK_v6.1.2-Full/MotorControl/MCSDK/MCLib/G4xx/Inc -I../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I../Drivers/CMSIS/Include -Ofast -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"MotorControl/mc_api.d" -MT"MotorControl/mc_api.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "MotorControl/mc_api.o"
arm-none-eabi-gcc "../MotorControl/mc_app_hooks.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32G431xx -c -I../MotorControl/App -I../MotorControl -I../Core/Inc -I../Drivers/STM32G4xx_HAL_Driver/Inc -I../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I../MCSDK_v6.1.2-Full/MotorControl/MCSDK/MCLib/Any/Inc -I../MCSDK_v6.1.2-Full/MotorControl/MCSDK/MCLib/G4xx/Inc -I../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I../Drivers/CMSIS/Include -Ofast -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"MotorControl/mc_app_hooks.d" -MT"MotorControl/mc_app_hooks.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "MotorControl/mc_app_hooks.o"
In file included from ../MCSDK_v6.1.2-Full/MotorControl/MCSDK/MCLib/Any/Inc/mc_type.h:56,
from ../MotorControl/mc_math.h:28,
from ../MotorControl/parameters_conversion.h:26,
from ../MotorControl/aspep.h:25,
from ../MotorControl/aspep.c:23:
../MotorControl/mc_stm_types.h:99:12: fatal error: stm32g4xx_ll_opamp.h: No such file or directory
99 | #include "stm32g4xx_ll_opamp.h"
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ../MCSDK_v6.1.2-Full/MotorControl/MCSDK/MCLib/Any/Inc/mc_type.h:56,
from ../MotorControl/mc_interface.h:32,
from ../MotorControl/mc_api.c:21:
../MotorControl/mc_stm_types.h:99:12: fatal error: stm32g4xx_ll_opamp.h: No such file or directory
99 | #include "stm32g4xx_ll_opamp.h"
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [MotorControl/subdir.mk:64: MotorControl/mc_api.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [MotorControl/subdir.mk:64: MotorControl/aspep.o] Error 1
In file included from ../MCSDK_v6.1.2-Full/MotorControl/MCSDK/MCLib/Any/Inc/mc_type.h:56,
from ../MCSDK_v6.1.2-Full/MotorControl/MCSDK/MCLib/Any/Inc/pid_regulator.h:33,
from ../MotorControl/mc_config.h:24,
from ../MotorControl/App/motorcontrol.h:25,
from ../Core/Inc/main.h:31,
from ../MotorControl/App/motorcontrol.c:21:
../MotorControl/mc_stm_types.h:99:12: fatal error: stm32g4xx_ll_opamp.h: No such file or directory
99 | #include "stm32g4xx_ll_opamp.h"
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [MotorControl/App/subdir.mk:19: MotorControl/App/motorcontrol.o] Error 1
In file included from ../MCSDK_v6.1.2-Full/MotorControl/MCSDK/MCLib/Any/Inc/mc_type.h:56,
from ../MotorControl/mc_app_hooks.c:23:
../MotorControl/mc_stm_types.h:99:12: fatal error: stm32g4xx_ll_opamp.h: No such file or directory
99 | #include "stm32g4xx_ll_opamp.h"
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [MotorControl/subdir.mk:64: MotorControl/mc_app_hooks.o] Error 1
"make -j4 all" terminated with exit code 2. Build might be incomplete.
2023-08-21 08:18 AM
Hello @Manoj Thakur ,
Can you tell me which exact version of MCSDK you are using and attach your .stwb6 file please? I will do my best to help you.
Regards
2023-08-21 09:02 PM - edited 2023-08-22 08:52 PM
MCSDK 6 have have downloaded yesterday.
To reduce file size I deleted CMIS folder from Driver Folder, Everything else is there in attached file.
1. I am new to STM32, But having very good experience of 20 years in AVR, LPC2148, ESP32 coding.
2. Currently we are building Motor controller for 2 Wheeler EV, We are using slotless BLDC motor 2KW to 5KW. I am working as consultant. My job is to develop motor controller and assist them in electronics related quires.
3. Can you give me few sample codes related to bldc motor controller I have B-G431B-ESC1 board?(both sensor less and hall sensor based FOC and 6 step commutation codes are preferred, as we have very low inductance of motor high frequency pwm will generate more losses in motor)
4. How to open project opening folder or by creating new project using generated ioc file?
5. With Opening folder as project gives me error no build configuration set. with ioc file i am getting error related to missing .h files. Which way is correct?
6. I have both Arduino based and CubeIDE based setup ready.
7. While generating code using MCSDK 6. I get few errors only related to sun.security.provide.certpath unable to find valid certification path. I think its due to old cacerts present in jre folder. If your is working please give me zip of cacert from jre folder C:/programfile/stmicroelectronics/stm32cube/stm32cubemx/jre/ I thinks cacert is in bin folder.