Skip to main content
Associate III
March 13, 2025
Question

Validation on target hal driver error

  • March 13, 2025
  • 1 reply
  • 1896 views

I tried to validate on desktop... an ai model but ended with this error...

Pinagadi_Meghana_0-1741860214520.png

please help me with this error

1 reply

Andrew Neil
Super User
March 13, 2025

@Pinagadi_Meghana wrote:

I tried to validate on desktop


But the thread title says "on target" - so which is it?

 


@Pinagadi_Meghana wrote:
AndrewNeil_0-1741861538398.png

So it's telling you that it can't find the file stm32h7xx.h

Therefore you need to check two things:

  1. Does that file actually exist anywhere in your project?
    If not, then that obviously explains why the compiler can't find it!
     
  2. If it does exist, is it in a location where the compiler will find it?
    ie, are you Include Paths correctly configured?

 

BTW: it's better to post the error messages as text - rather than an image:

https://community.st.com/t5/community-guidelines/how-to-insert-source-code/tac-p/752812/highlight/true#M59

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Associate III
March 13, 2025

Sorry... It is validation on target only...
the error message is

Building project
Generating project
Temporary project loaded
Temporary AI configuration done
Generating temporary project code
Building project
C:/ST/STM32CubeIDE_1.18.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/arm-none-eabi-gcc -c -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard  -DDEBUG -DUSE_PWR_LDO_SUPPLY -DUSE_NUCLEO_64 -DUSE_HAL_DRIVER -DSTM32H753xx -D  -IDrivers/CMSIS/Device/ST/STM32H7xx/Include -IDrivers/CMSIS/Include -IDrivers/STM32H7xx_HAL_Driver/Inc/Legacy -IDrivers/STM32H7xx_HAL_Driver/Inc -IInc -IMiddlewares/ST/AI/Inc -O3  -Wall -fdata-sections -ffunction-sections Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c -o Debug/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.o
<command-line>: error: macro names must be identifiers
In file included from Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h:27,
                 from Inc/stm32h7xx_hal_conf.h:246,
                 from Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal.h:29,
                 from Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c:36:
Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_def.h:29:10: fatal error: stm32h7xx.h: No such file or directory
   29 | #include "stm32h7xx.h"
      |          ^~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:76: Debug/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.o] Error 1
Automatic build and run failed