Skip to main content
Spalt.1
Visitor II
April 7, 2021
Question

Problem with adding library to keil program

  • April 7, 2021
  • 1 reply
  • 1406 views

Hello to everyone

I want to print "Hello World" to the screen using the stm32f103ve card.

and when it comes to the "HAL driver" section and adds the libraries to the project, it gives an error.

the error is as follows:

..\..\main.c(3): error: #5: cannot open source input file "stm32f10x_gpio.h": No such file or directory

where am I making a mistake?

This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
April 7, 2021

In the C/C++ tab of the project options you need to set the Include Paths to point to the respective directories the include files live in.

Perhaps start by looking at or inspecting the form of the Template projects under the CubeF1 trees

STM32Cube_FW_F1_V1.8.0\Projects\STM3210E_EVAL\Templates\MDK-ARM\Project.uvprojx

             <IncludePath>../Inc;../../../../Drivers/CMSIS/Device/ST/STM32F1xx/Include;../../../../Drivers/STM32F1xx_HAL_Driver/Inc;../../../../Drivers/BSP/STM3210E_EVAL;../../../../Drivers/BSP/Components/Common;../../../../Utilities/Log;../../../../Utilities/CPU</IncludePath>

             <Define>USE_HAL_DRIVER,STM32F103xG,USE_STM3210E_EVAL</Define>

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