OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 2453|回复: 4

求助stm32cubemx 生成工程后编译出错

[复制链接]

6

主题

22

帖子

0

精华

初级会员

Rank: 2

积分
109
金钱
109
注册时间
2013-8-7
在线时间
46 小时
发表于 2019-7-24 23:18:01 | 显示全部楼层 |阅读模式
10金钱
我用STM32CUBE 5.2.0生成工程后,用 KEILV5.23.0.0编译,所有的头文件都无法加载。头文件都包含在inc文件夹里了,路径也设置正确。可是所有的头文件都编译出错。*** Using Compiler 'V5.06 update 4 (build 422)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Rebuild target 'I2C'
assembling startup_stm32f103xb.s...
compiling main.c...
..\Inc\stm32f1xx_hal_conf.h(246): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
../Src/main.c: 0 warnings, 1 error
compiling gpio.c...
..\Inc\stm32f1xx_hal_conf.h(246): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
../Src/gpio.c: 0 warnings, 1 error
compiling i2c.c...
..\Inc\stm32f1xx_hal_conf.h(246): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
../Src/i2c.c: 0 warnings, 1 error
compiling stm32f1xx_it.c...
..\Inc\stm32f1xx_hal_conf.h(246): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
../Src/stm32f1xx_it.c: 0 warnings, 1 error
compiling stm32f1xx_hal_msp.c...
..\Inc\stm32f1xx_hal_conf.h(246): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
../Src/stm32f1xx_hal_msp.c: 0 warnings, 1 error
compiling stm32f1xx_hal_gpio_ex.c...
..\Inc\stm32f1xx_hal_conf.h(246): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c: 0 warnings, 1 error
compiling stm32f1xx_hal_i2c.c...
..\Inc\stm32f1xx_hal_conf.h(246): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_i2c.c: 0 warnings, 1 error
compiling stm32f1xx_hal_tim.c...
..\Inc\stm32f1xx_hal_conf.h(246): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c: 0 warnings, 1 error
compiling stm32f1xx_hal_tim_ex.c...
..\Inc\stm32f1xx_hal_conf.h(246): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c: 0 warnings, 1 error
compiling stm32f1xx_hal.c...
..\Inc\stm32f1xx_hal_conf.h(246): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c: 0 warnings, 1 error
compiling stm32f1xx_hal_rcc.c...
..\Inc\stm32f1xx_hal_conf.h(246): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c: 0 warnings, 1 error
compiling stm32f1xx_hal_rcc_ex.c...
..\Inc\stm32f1xx_hal_conf.h(246): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c: 0 warnings, 1 error
compiling stm32f1xx_hal_gpio.c...
..\Inc\stm32f1xx_hal_conf.h(246): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c: 0 warnings, 1 error
compiling stm32f1xx_hal_dma.c...
..\Inc\stm32f1xx_hal_conf.h(246): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c: 0 warnings, 1 error
compiling stm32f1xx_hal_cortex.c...
..\Inc\stm32f1xx_hal_conf.h(246): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c: 0 warnings, 1 error
compiling stm32f1xx_hal_pwr.c...
..\Inc\stm32f1xx_hal_conf.h(246): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c: 0 warnings, 1 error
compiling stm32f1xx_hal_flash.c...
..\Inc\stm32f1xx_hal_conf.h(246): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c: 0 warnings, 1 error
compiling stm32f1xx_hal_flash_ex.c...
..\Inc\stm32f1xx_hal_conf.h(246): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c: 0 warnings, 1 error
compiling stm32f1xx_hal_exti.c...
"no source": Error:  #5: cannot open source input file "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c": No such file or directory
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c: 0 warnings, 1 error
compiling system_stm32f1xx.c...
..\Inc\stm32f1xx_hal_conf.h(246): error:  #5: cannot open source input file "stm32f1xx_hal_exti.h": No such file or directory
  #include "stm32f1xx_hal_exti.h"
../Src/system_stm32f1xx.c: 0 warnings, 1 error
"I2C\I2C.axf" - 19 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed:  00:00:31

生成的工程一个字都没有改。
求大神指点。

最佳答案

查看完整内容[请看2#楼]

stm32f1xx_hal_exti.h这个头文件没有,看看你工程目录下有没有这个文件
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

2

主题

106

帖子

0

精华

高级会员

Rank: 4

积分
714
金钱
714
注册时间
2011-5-15
在线时间
147 小时
发表于 2019-7-24 23:18:02 | 显示全部楼层
stm32f1xx_hal_exti.h这个头文件没有,看看你工程目录下有没有这个文件
回复

使用道具 举报

530

主题

11万

帖子

34

精华

管理员

Rank: 12Rank: 12Rank: 12

积分
165524
金钱
165524
注册时间
2010-12-1
在线时间
2116 小时
发表于 2019-7-25 02:27:42 | 显示全部楼层
帮顶
回复

使用道具 举报

6

主题

22

帖子

0

精华

初级会员

Rank: 2

积分
109
金钱
109
注册时间
2013-8-7
在线时间
46 小时
 楼主| 发表于 2019-7-25 11:11:03 | 显示全部楼层
这个是工程文件

I2C.zip

486.63 KB, 下载次数: 45

回复

使用道具 举报

6

主题

22

帖子

0

精华

初级会员

Rank: 2

积分
109
金钱
109
注册时间
2013-8-7
在线时间
46 小时
 楼主| 发表于 2019-7-25 16:44:09 | 显示全部楼层
stm32f1xx_hal_exti.h这个文件哪里找得到?把它屏蔽了又出现没有发现stm32f1xx_hal_exti.c只好把它也删除了,这样编译通过。谢谢你的答复。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2025-6-6 22:42

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表