cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f1xx.h file cannot be found

Wan_G
Associate

Hello everyone, I have a question. I am using CubemX to generate HAL library and FreeRTOS. There are no errors during the compilation, but when I write the code, the auto-completion feature does not work (I have set it up), and even the uint8_t variable does not turn blue. When I look at the project files, it says that the stm32f1xx.h file cannot be found, but the entire project was generated by CubemX, and the file is located in the file path. I have also added the path to the file in C/C++ and there were no errors during the compilation. I cannot find a solution to this problem online, so I am seeking help from the experts here.

2 REPLIES 2
SofLit
ST Employee

Hello @Wan_G @and welcome to the community,

It will be helpful if you share your project.

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.

@Wan_G wrote:

There are no errors during the compilation, but when I write the code, the auto-completion feature does not work .


So the problem is just in the Editor - not in the compiler configuration.

You haven't said what IDE you're using. For STM32CubeIDE, try rebuilding the index:

AndrewNeil_0-1731921486712.png

https://community.st.com/t5/stm32cubeide-mcus/defines-not-changing-grayed-out-statuses/m-p/684561/highlight/true#M28079