cancel
Showing results for 
Search instead for 
Did you mean: 

header file can not be included in the build

demir
Senior II

Hi All,

I am compiling my code, then I get the error below. As you can see, stm32f4xx.hal_can.h is included under project. But, when I click on open declaration for CAN_HandleTypeDef, it does not take me to the stm32f4xx.hal_can.h file. It is like the .h file is not included in the build. 

I have confirmed project properties includes stm32f4xx.hal_can.h is under included directories (please see the last snapshot).

 

Could anyone please guide me with this ?

Thanks.

 

 

arm-none-eabi-gcc "../App/led.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F407xx -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -I"C:/Users/bjvyhb/OneDrive - PHINIA/Desktop/FastBit/openBLT/openblt_v011600/Target/Demo/ARMCM4_STM32F4_Nucleo_F429ZI_CubeIDE/my_prog/App" -I"C:/Users/bjvyhb/OneDrive - PHINIA/Desktop/FastBit/openBLT/openblt_v011600/Target/Demo/ARMCM4_STM32F4_Nucleo_F429ZI_CubeIDE/my_prog/Drivers" -I"C:/Users/bjvyhb/OneDrive - PHINIA/Desktop/FastBit/openBLT/openblt_v011600/Target/Demo/ARMCM4_STM32F4_Nucleo_F429ZI_CubeIDE/my_prog/Drivers/STM32F4xx_HAL_Driver/Inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"App/led.d" -MT"App/led.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "App/led.o"

arm-none-eabi-gcc "../App/timer.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F407xx -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -I"C:/Users/bjvyhb/OneDrive - PHINIA/Desktop/FastBit/openBLT/openblt_v011600/Target/Demo/ARMCM4_STM32F4_Nucleo_F429ZI_CubeIDE/my_prog/App" -I"C:/Users/bjvyhb/OneDrive - PHINIA/Desktop/FastBit/openBLT/openblt_v011600/Target/Demo/ARMCM4_STM32F4_Nucleo_F429ZI_CubeIDE/my_prog/Drivers" -I"C:/Users/bjvyhb/OneDrive - PHINIA/Desktop/FastBit/openBLT/openblt_v011600/Target/Demo/ARMCM4_STM32F4_Nucleo_F429ZI_CubeIDE/my_prog/Drivers/STM32F4xx_HAL_Driver/Inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"App/timer.d" -MT"App/timer.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "App/timer.o"

../App/boot.c:287:8: error: unknown type name 'CAN_HandleTypeDef'

287 | static CAN_HandleTypeDef canHandle;

| ^~~~~~~~~~~~~~~~~

 

demir_0-1706431575259.png

 

demir_1-1706431767698.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Check which subcomponents are enabled in stm32f4xx_hal_conf.h

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

1 REPLY 1

Check which subcomponents are enabled in stm32f4xx_hal_conf.h

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..