Skip to main content
SMand.2
Associate
January 27, 2023
Solved

Hello, I am new to STM32, while making a empty project there is no stm32f4XX_hal_conf.h file created, so when i include stm32f4xx_hal.h and build my library it throws an error stating "fatal error: stm32f4xx_hal_conf.h" how to resolve this issue.

..

This topic has been closed for replies.
Foued_KH
Foued_KHBest answer
ST Employee
January 27, 2023

Hello @SMand.2​ ,

After generating a code based on STM32CubeMX, there is a necessary files must be included in STM32 projects so try to check the availability of thus files into your project.

Please check the path of your include directories :

0693W00000Y9M9xQAF.pngFoued

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

4 replies

Foued_KH
Foued_KHBest answer
ST Employee
January 27, 2023

Hello @SMand.2​ ,

After generating a code based on STM32CubeMX, there is a necessary files must be included in STM32 projects so try to check the availability of thus files into your project.

Please check the path of your include directories :

0693W00000Y9M9xQAF.pngFoued

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
SMand.2
SMand.2Author
Associate
January 30, 2023

Thanks for answering my doubt.

Tesla DeLorean
Guru
January 27, 2023

How are you making the empty project, in what?

There are template versions of the stm32f4xx_hal_conf.h that can be used, or copied from other projects.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
SMand.2
SMand.2Author
Associate
January 30, 2023

Thanks!