OpenEdv-开源电子网

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

编译出现 cannot open source input file "stm32f10x_map.h": No such file or directory怎么解决

[复制链接]

5

主题

8

帖子

0

精华

新手上路

积分
21
金钱
21
注册时间
2018-12-5
在线时间
5 小时
发表于 2018-12-6 12:08:43 | 显示全部楼层 |阅读模式
1金钱
..\SYSTEM\sys\sys.h(3): error:  #5: cannot open source input file "stm32f10x_map.h": No such file or directory
  #include <stm32f10x_map.h>
..\HARDWARE\RTC\rtc.c: 0 warnings, 1 error
compiling wkup.c...
..\SYSTEM\sys\sys.h(3): error:  #5: cannot open source input file "stm32f10x_map.h": No such file or directory
  #include <stm32f10x_map.h>
..\HARDWARE\WKUP\wkup.c: 0 warnings, 1 error
compiling adc.c...
..\SYSTEM\sys\sys.h(3): error:  #5: cannot open source input file "stm32f10x_map.h": No such file or directory
  #include <stm32f10x_map.h>
..\HARDWARE\ADC\adc.c: 0 warnings, 1 error
compiling dac.c...
..\SYSTEM\sys\sys.h(3): error:  #5: cannot open source input file "stm32f10x_map.h": No such file or directory
  #include <stm32f10x_map.h>
..\HARDWARE\DAC\dac.c: 0 warnings, 1 error
compiling dma.c...
..\SYSTEM\sys\sys.h(3): error:  #5: cannot open source input file "stm32f10x_map.h": No such file or directory
  #include <stm32f10x_map.h>
..\HARDWARE\DMA\dma.c: 0 warnings, 1 error
compiling myiic.c...
..\SYSTEM\sys\sys.h(3): error:  #5: cannot open source input file "stm32f10x_map.h": No such file or directory
  #include <stm32f10x_map.h>
..\HARDWARE\24CXX\myiic.c: 0 warnings, 1 error
compiling 24cxx.c...
..\SYSTEM\sys\sys.h(3): error:  #5: cannot open source input file "stm32f10x_map.h": No such file or directory
  #include <stm32f10x_map.h>
..\HARDWARE\24CXX\24cxx.c: 0 warnings, 1 error
compiling spi.c...
..\SYSTEM\sys\sys.h(3): error:  #5: cannot open source input file "stm32f10x_map.h": No such file or directory
  #include <stm32f10x_map.h>
..\HARDWARE\SPI\spi.c: 0 warnings, 1 error
compiling flash.c...
..\SYSTEM\sys\sys.h(3): error:  #5: cannot open source input file "stm32f10x_map.h": No such file or directory
  #include <stm32f10x_map.h>
..\HARDWARE\FLASH\flash.c: 0 warnings, 1 error
compiling rs485.c...
..\SYSTEM\sys\sys.h(3): error:  #5: cannot open source input file "stm32f10x_map.h": No such file or directory
  #include <stm32f10x_map.h>
..\HARDWARE\RS485\rs485.c: 0 warnings, 1 error
compiling touch.c...
..\HARDWARE\TOUCH\touch.c(1): error:  #5: cannot open source input file "stm32f10x_map.h": No such file or directory
  #include <stm32f10x_map.h>
..\HARDWARE\TOUCH\touch.c: 0 warnings, 1 error
compiling can.c...
..\SYSTEM\sys\sys.h(3): error:  #5: cannot open source input file "stm32f10x_map.h": No such file or directory
  #include <stm32f10x_map.h>
..\HARDWARE\CAN\can.c: 0 warnings, 1 error
compiling remote.c...
..\SYSTEM\sys\sys.h(3): error:  #5: cannot open source input file "stm32f10x_map.h": No such file or directory
  #include <stm32f10x_map.h>
..\HARDWARE\REMOTE\remote.c: 0 warnings, 1 error
compiling joypad.c...
..\SYSTEM\sys\sys.h(3): error:  #5: cannot open source input file "stm32f10x_map.h": No such file or directory
  #include <stm32f10x_map.h>
..\HARDWARE\JOYPAD\joypad.c: 0 warnings, 1 error
compiling adxl345.c...
..\SYSTEM\sys\sys.h(3): error:  #5: cannot open source input file "stm32f10x_map.h": No such file or directory
  #include <stm32f10x_map.h>
..\HARDWARE\ADXL345\adxl345.c: 0 warnings, 1 error
compiling usmart.c...
..\SYSTEM\usart\usart.h(3): error:  #5: cannot open source input file "stm32f10x_map.h": No such file or directory
  #include <stm32f10x_map.h>
..\USMART\usmart.c: 0 warnings, 1 error
compiling usmart_config.c...
..\SYSTEM\delay\delay.h(3): error:  #5: cannot open source input file "stm32f10x_map.h": No such file or directory
  #include <stm32f10x_map.h>          
..\USMART\usmart_config.c: 0 warnings, 1 error
compiling usmart_str.c...
"..\OBJ\test.axf" - 30 Error(s), 0 Warning(s).

正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

109

主题

5564

帖子

0

精华

资深版主

Rank: 8Rank: 8

积分
10572
金钱
10572
注册时间
2017-2-18
在线时间
1914 小时
发表于 2018-12-6 14:01:55 | 显示全部楼层
本帖最后由 peng1554 于 2018-12-6 18:28 编辑


1.看MDK安装路径是否带有中文字符或者空格(不能有中文字符或者空格)
2.看系统用户名是否有中文字符(不能有中文字符)
3.以上不行的话修改环境变量,参见这个视频:
https://pan.baidu.com/s/1bivaHnSTHag3cqoXfLV7oA修改下,3楼说的也是造成这种现象的原因。你看看工程是否有这个头文件,有的话将头文件路径添加到工程当中
回复

使用道具 举报

2

主题

8

帖子

0

精华

新手入门

积分
16
金钱
16
注册时间
2018-12-3
在线时间
3 小时
发表于 2018-12-6 17:03:18 | 显示全部楼层
可能是没有包含头文件,或者在工程配置里面相关文件夹没有被添加
回复

使用道具 举报

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

本版积分规则



关闭

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

正点原子公众号

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

GMT+8, 2025-6-30 21:47

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

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