2024-03-14 12:44 AM
Hi all,
Im having problems with my IDE, I cant seem to add the stm32f407xx.h library to my project, which is an internal library provided by ST. I added it to the linker GCC both the path to the file directory and the file itself and its still not accepted by the compiler.
Solved! Go to Solution.
2024-03-14 08:53 AM
Your project structure is missing the drivers: CMSIS and HAL:
I invite you to look at one of the examples provided by STM32CubeF4:
example: https://github.com/STMicroelectronics/STM32CubeF4/tree/master/Projects/STM32F4-Discovery/Examples/GPIO/GPIO_EXTI to show how a project is structured.
Or simply generate the code with CubeMx. It will generate all the needed drivers' files.
PS: looking at your main.c file: I don't recommend to start with direct access to the registers from the beginning. Start by using HAL then switch for an optimization as you did.
2024-03-14 01:29 AM
Hello @ADyankov
I would appreciate it if you could tell me which version of STM32CubeIDE you are utilizing and your operating system.
I will be waiting for your feedback.
Thx
Ghofrane
2024-03-14 01:39 AM
2024-03-14 02:09 AM
Hello again @ADyankov
Actually I created a project using version 1.14.1 on windows 10 and everything works correctly after adding the
#include <stm32f407xx.h> as you did
So make sure that the firmware FW_F4 is installed correctly and stm32f407xx.h does exist in your directory also make sure that the required paths are added correctly under GCC compiler .
THX
Ghofrane
2024-03-14 02:36 AM
I did the same as you and now it accepted the library path on compile it gave the following output.
2024-03-14 02:40 AM
Here I write a simply program for one of the LED's on the 407 discovery board using the stm32f407xx.h library and it states as there are no changes so nothing to be compiled.
2024-03-14 03:55 AM
Hello @ADyankov
Could you please provide a screenshot of the entire error message?
2024-03-14 05:42 AM
Hello @Ghofrane GSOURI
Here is a log file of the error msg.
2024-03-14 06:02 AM
@ADyankov Where your project comes from? Was it generated by CubeMX/IDE?
Have you installed the firmware library package for STM32F4? (X-CUBE-TOF1 is not enough, please install the STM32F4 library too)
2024-03-14 06:15 AM
Hi @Pavel A., the project is generated by CubeIDE, the libraries are present in the directory of the software itself.