RT_Thread ——制作STM32 BSP中遇到的问题 cannot open source input file "stm32f1xx_hal_exti.h"

  跟着官方教程一顿猛操作,结果一编译全报错。。

  移植平台: STM32F103ZET6    MDK5

  

Build target 'rt-thread'
compiling main.c...
board\CubeMX_Config\Inc\stm32f1xx_hal_conf.h(245): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
applications\main.c: 0 warnings, 1 error
compiling board.c...
board\CubeMX_Config\Inc\stm32f1xx_hal_conf.h(245): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
board\board.c: 0 warnings, 1 error
compiling stm32f1xx_hal_msp.c...
board\CubeMX_Config\Inc\stm32f1xx_hal_conf.h(245): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
board\CubeMX_Config\Src\stm32f1xx_hal_msp.c: 0 warnings, 1 error
compiling drv_gpio.c...
board\CubeMX_Config\Inc\stm32f1xx_hal_conf.h(245): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
..\libraries\HAL_Drivers\drv_gpio.c: 0 warnings, 1 error
compiling drv_usart.c...
board\CubeMX_Config\Inc\stm32f1xx_hal_conf.h(245): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
..\libraries\HAL_Drivers\drv_usart.c: 0 warnings, 1 error
compiling drv_common.c...
board\CubeMX_Config\Inc\stm32f1xx_hal_conf.h(245): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
..\libraries\HAL_Drivers\drv_common.c: 0 warnings, 1 error
compiling system_stm32f1xx.c...
board\CubeMX_Config\Inc\stm32f1xx_hal_conf.h(245): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
..\libraries\STM32F1xx_HAL\CMSIS\Device\ST\STM32F1xx\Source\Templates\system_stm32f1xx.c: 0 warnings, 1 error
compiling stm32f1xx_hal_dma.c...
board\CubeMX_Config\Inc\stm32f1xx_hal_conf.h(245): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_dma.c: 0 warnings, 1 error
compiling stm32f1xx_hal_cortex.c...
board\CubeMX_Config\Inc\stm32f1xx_hal_conf.h(245): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_cortex.c: 0 warnings, 1 error
compiling stm32f1xx_hal_crc.c...
board\CubeMX_Config\Inc\stm32f1xx_hal_conf.h(245): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_crc.c: 0 warnings, 1 error
compiling stm32f1xx_hal_pwr.c...
board\CubeMX_Config\Inc\stm32f1xx_hal_conf.h(245): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_pwr.c: 0 warnings, 1 error
compiling stm32f1xx_hal_rcc.c...
board\CubeMX_Config\Inc\stm32f1xx_hal_conf.h(245): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rcc.c: 0 warnings, 1 error
compiling stm32f1xx_hal_rcc_ex.c...
board\CubeMX_Config\Inc\stm32f1xx_hal_conf.h(245): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rcc_ex.c: 0 warnings, 1 error
compiling stm32f1xx_hal.c...
board\CubeMX_Config\Inc\stm32f1xx_hal_conf.h(245): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal.c: 0 warnings, 1 error
compiling stm32f1xx_hal_cec.c...
board\CubeMX_Config\Inc\stm32f1xx_hal_conf.h(245): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_cec.c: 0 warnings, 1 error
compiling stm32f1xx_hal_sram.c...
board\CubeMX_Config\Inc\stm32f1xx_hal_conf.h(245): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_sram.c: 0 warnings, 1 error
compiling stm32f1xx_hal_gpio.c...
board\CubeMX_Config\Inc\stm32f1xx_hal_conf.h(245): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_gpio.c: 0 warnings, 1 error
compiling stm32f1xx_hal_gpio_ex.c...
board\CubeMX_Config\Inc\stm32f1xx_hal_conf.h(245): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_gpio_ex.c: 0 warnings, 1 error
compiling stm32f1xx_hal_uart.c...
board\CubeMX_Config\Inc\stm32f1xx_hal_conf.h(245): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_uart.c: 0 warnings, 1 error
compiling stm32f1xx_hal_usart.c...
board\CubeMX_Config\Inc\stm32f1xx_hal_conf.h(245): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_usart.c: 0 warnings, 1 error
".\build\keil\Obj\rt-thread.axf" - 20 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed:  00:00:04

先附官方教程链接

STM32 BSP制作文档教程

STM32 BSP制作视频教程

完完全全跟着教程来的,结果还是编译报错了。从报错信息可以看出缺少 stm32f1xx_hal_exti.h 源文件,我们手动添加一次即可。下载 stm32f1xx_hal_exti.h 源文件,添加到这个路径下面放在这个路径下:

rt-thread\bsp\stm32\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Inc

附上 stm32f1xx_hal_exti.h下载链接。

链接:https://pan.baidu.com/s/1MwmRe24o0C0PeRHQtTS3Bw 
提取码:i2o2 
 

你可能感兴趣的:(RT_Thread)