2024-11-06 02:37 AM
Hello. I have made with ST Edge AI Developer Cloud a model and downloaded the whole project for STM32CubeIDE.
When I do Validate on desktop it works fine and I get expected results.
But Validate on target gives me a compilation error.
Building project
Generating project
Temporary project loaded
Temporary AI configuration done
Generating temporary project code
Building project
C:/ST/STM32CubeIDE_1.16.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/arm-none-eabi-gcc -c -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -DDEBUG -DUSE_HAL_DRIVER -DSTM32G491xx -D -IDrivers/CMSIS/Device/ST/STM32G4xx/Include -IDrivers/CMSIS/Include -IDrivers/STM32G4xx_HAL_Driver/Inc/Legacy -IDrivers/STM32G4xx_HAL_Driver/Inc -IInc -IMiddlewares/ST/AI/Inc -O3 -Wall -fdata-sections -ffunction-sections Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal.c -o Debug/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal.o
<command-line>: error: macro names must be identifiers
In file included from Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_rcc.h:27,
from Inc/stm32g4xx_hal_conf.h:212,
from Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal.h:29,
from Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal.c:35:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_def.h:29:10: fatal error: stm32g4xx.h: No such file or directory
29 | #include "stm32g4xx.h"
| ^~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:75: Debug/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal.o] Error 1
Automatic build and run failed
So it does not compile successfully with the no such file or directory for stm32g4xx.h
I have made zero changes to the downloaded project from Developer cloud. And when I try and compile the project myself, it does so successfully.
2024-11-06 07:17 AM
Hello,
Is it possible to share your version of STM32CubeMX and maybe your project ?
It looks like it does not include automatically the HAL from your target.
Best regards,
Yanis
2024-11-06 07:31 AM
2024-11-06 07:49 AM
>>It looks like it does not include automatically the HAL from your target.
Failure on the Include Paths most likely, double check what's passed in, and the Environment Variables