2021-04-25 12:07 PM
Hello
i use stm32f103ve board.
I have been trying to realize a project for a few months.
but unfortunately I could not move forward at all.
I am trying to add lcd library using the Keil program.
the operations I have done are as follows:
I select my processor from cubemx, define pin and generate code.
Then I added lcd.c library to the "Driver / Hal_Driver" section.
I specified the path to the .h file from the "options / c-c ++" include paths settings.
After compiling it gave the error that the gpio.h file could not be found.
I downloaded the gpio.c and .h files from github and added the library to the "Driver / Hal_Driver" section and specified the path.
but still doesn't see the gpio.h library.
I saved the gpio.c libraries as follows:
I went to the project file I created.
I say new-text document and paste it.
I say save with difference and specify the .c and .h files.
tell me where I made the mistake
2021-04-25 12:23 PM
Include files are not libraries, they should really just describe the interfaces.
You don't explicitly add .H files to a project, but they need to reside on a path you'd described in the "Include Paths" in the project's options. They then should be loadable via an #include <x.h>
Put the .C and .H files in your project directory
If you have separate Src and Inc directories, add the Include Path as ..\Inc (or the relative path vs the project file)
If it can't find the files it's because the naming or pathing are wrong.
Perhaps you have a supervisor or colleague who can walk you through the process and expectations.