KEIL报错:fatal error in include chain(stm32f4xx_conf.h): stm32f4xx_dma.h not found 解决办法(参考同平台大佬)

当遇到Keil编译时报错找不到某个头文件,如stm32f4xx_dma.h,可以尝试查找UV4文件夹中的UVCC.ini文件,用记事本打开并添加缺失的头文件路径。这样能消除编译错误,使程序正常运行。

程序正常编译可以通过,也不报错,但是头文件“sys.h”有一个下划红线(因为我的已经改过了,所以此处用红色标记了下),鼠标光标靠近,提示我有错误:KEIL报错:fatal error in include chain(stm32f4xx_conf.h): stm32f4xx_dma.h not found  ,也是找到了网上也有人遇到了相同的问题,https://blog.youkuaiyun.com/gin_love/article/details/87633814 附上链接

解决办法: 找到keil软件安装路径的UV4 文件夹,搜索找到文件夹中的 UVCC.ini 文件,用记事本打开,将报错的那个头文件添加到文件中 。

添加成功,那个下划线就消失了,舒服了。

*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'D:\Keil5\ARM\ARMCC\Bin' Rebuild target 'OLED' compiling lcd.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" ..\HARDWARE\LCD\lcd.c: 0 warnings, 1 error compiling main.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" main.c: 0 warnings, 1 error compiling stm32f4xx_it.c... stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" stm32f4xx_it.c: 0 warnings, 1 error compiling delay.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" ..\SYSTEM\delay\delay.c: 0 warnings, 1 error compiling usart.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" ..\SYSTEM\usart\usart.c: 0 warnings, 1 error compiling misc.c... ..\FWLIB\src\misc.c(76): error: #5: cannot open source input file "misc.h": No such file or directory #include "misc.h" ..\FWLIB\src\misc.c: 0 warnings, 1 error compiling stm32f4xx_syscfg.c... ..\FWLIB\src\stm32f4xx_syscfg.c(50): error: #5: cannot open source input file "stm32f4xx_syscfg.h": No such file or directory #include "stm32f4xx_syscfg.h" ..\FWLIB\src\stm32f4xx_syscfg.c: 0 warnings, 1 error compiling sys.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" ..\SYSTEM\sys\sys.c: 0 warnings, 1 error compiling stm32f4xx_hal.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c: 0 warnings, 1 error compiling system_stm32f4xx.c... stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" system_stm32f4xx.c: 0 warnings, 1 error compiling lcd_init.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" ..\HARDWARE\LCD\lcd_init.c: 0 warnings, 1 error compiling stm32f4xx_rcc.c... ..\FWLIB\src\stm32f4xx_rcc.c(59): error: #5: cannot open source input file "stm32f4xx_rcc.h": No such file or directory #include "stm32f4xx_rcc.h" ..\FWLIB\src\stm32f4xx_rcc.c: 0 warnings, 1 error assembling startup_stm32f40_41xxx.s... compiling stm32f4xx_gpio.c... ..\FWLIB\src\stm32f4xx_gpio.c(84): error: #5: cannot open source input file "stm32f4xx_gpio.h": No such file or directory #include "stm32f4xx_gpio.h" ..\FWLIB\src\stm32f4xx_gpio.c: 0 warnings, 1 error compiling stm32f4xx_hal_rcc.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c: 0 warnings, 1 error compiling stm32f4xx_hal_cortex.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c: 0 warnings, 1 error compiling key.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" key.c: 0 warnings, 1 error compiling stm32f4xx_usart.c... ..\FWLIB\src\stm32f4xx_usart.c(92): error: #5: cannot open source input file "stm32f4xx_usart.h": No such file or directory #include "stm32f4xx_usart.h" ..\FWLIB\src\stm32f4xx_usart.c: 0 warnings, 1 error compiling stm32f4xx_hal_dma.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c: 0 warnings, 1 error compiling stm32f4xx_hal_gpio.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c: 0 warnings, 1 error compiling stm32f4xx_hal_dma_ex.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c: 0 warnings, 1 error compiling stm32f4xx_hal_rcc_ex.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c: 0 warnings, 1 error assembling startup_stm32f407xx.s... compiling stm32f4xx_hal_uart.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c: 0 warnings, 1 error compiling stm32f4xx_hal_tim.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim.c: 0 warnings, 1 error compiling system_stm32f4xx.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" RTE\Device\STM32F407ZG\system_stm32f4xx.c: 0 warnings, 1 error compiling led.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" ..\HARDWARE\LED\led.c: 0 warnings, 1 error compiling stm32f4xx_hal_usart.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_usart.c: 0 warnings, 1 error compiling stm32f4xx_hal_tim_ex.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim_ex.c: 0 warnings, 1 error compiling stm32f4xx_hal_pwr_ex.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c: 0 warnings, 1 error compiling stm32f4xx_hal_pwr.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c: 0 warnings, 1 error "..\OBJ\LCD.axf" - 29 Error(s), 0 Warning(s). Target not created. Build Time Elapsed: 00:00:03 请帮我分析剩下的问题,刚才将fwlib\inc删去路径了
07-12
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值