OpenEdv-开源电子网

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

mdk例程文件编译错误

[复制链接]

7

主题

22

帖子

0

精华

初级会员

Rank: 2

积分
80
金钱
80
注册时间
2015-8-16
在线时间
3 小时
发表于 2015-9-3 22:46:50 | 显示全部楼层 |阅读模式
5金钱
我从这里下载的视频文件和各种资料,然后我打开例程编译,无论是寄存器版本还是库函数都总是编译错误,比如LED的实验,后来参考了原子哥给别人发的帖子http://www.openedv.com/posts/list/10955.htm,结果还是不行,比如库函数版本,错误如下
Build target 'Target 1'
compiling main.c...
..\CORE\core_cm3.h(90): error:  #5: cannot open source input file "stdint.h": No such file or directory
  #include <stdint.h>                           /* Include standard types */
main.c: 0 warnings, 1 error
compiling stm32f10x_it.c...
..\CORE\core_cm3.h(90): error:  #5: cannot open source input file "stdint.h": No such file or directory
  #include <stdint.h>                           /* Include standard types */
stm32f10x_it.c: 0 warnings, 1 error
compiling system_stm32f10x.c...
..\CORE\core_cm3.h(90): error:  #5: cannot open source input file "stdint.h": No such file or directory
  #include <stdint.h>                           /* Include standard types */
system_stm32f10x.c: 0 warnings, 1 error
compiling led.c...
..\CORE\core_cm3.h(90): error:  #5: cannot open source input file "stdint.h": No such file or directory
  #include <stdint.h>                           /* Include standard types */
..\HARDWARE\LED\led.c: 0 warnings, 1 error
compiling delay.c...
..\CORE\core_cm3.h(90): error:  #5: cannot open source input file "stdint.h": No such file or directory
  #include <stdint.h>                           /* Include standard types */
..\SYSTEM\delay\delay.c: 0 warnings, 1 error
compiling sys.c...
..\CORE\core_cm3.h(90): error:  #5: cannot open source input file "stdint.h": No such file or directory
  #include <stdint.h>                           /* Include standard types */
..\SYSTEM\sys\sys.c: 0 warnings, 1 error
compiling usart.c...
..\CORE\core_cm3.h(90): error:  #5: cannot open source input file "stdint.h": No such file or directory
  #include <stdint.h>                           /* Include standard types */
..\SYSTEM\usart\usart.c: 0 warnings, 1 error
compiling core_cm3.c...
..\CORE\core_cm3.c(24): error:  #5: cannot open source input file "stdint.h": No such file or directory
  #include <stdint.h>
..\CORE\core_cm3.c: 0 warnings, 1 error
compiling stm32f10x_gpio.c...
..\CORE\core_cm3.h(90): error:  #5: cannot open source input file "stdint.h": No such file or directory
  #include <stdint.h>                           /* Include standard types */
..\STM32F10x_FWLib\src\stm32f10x_gpio.c: 0 warnings, 1 error
compiling stm32f10x_rcc.c...
..\CORE\core_cm3.h(90): error:  #5: cannot open source input file "stdint.h": No such file or directory
  #include <stdint.h>                           /* Include standard types */
..\STM32F10x_FWLib\src\stm32f10x_rcc.c: 0 warnings, 1 error
compiling stm32f10x_usart.c...
..\CORE\core_cm3.h(90): error:  #5: cannot open source input file "stdint.h": No such file or directory
  #include <stdint.h>                           /* Include standard types */
..\STM32F10x_FWLib\src\stm32f10x_usart.c: 0 warnings, 1 error
compiling misc.c...
..\CORE\core_cm3.h(90): error:  #5: cannot open source input file "stdint.h": No such file or directory
  #include <stdint.h>                           /* Include standard types */
..\STM32F10x_FWLib\src\misc.c: 0 warnings, 1 error
"..\OBJ\LED.axf" - 12 Error(s), 0 Warning(s).
Target not created
下图是我按照上面的链接添加文件


然后我用寄存器版本也试了一下,结果已哭,如图


然后还是各种报错,我只是个新手,虽说开头万事难,但是我快被虐哭了。。。求救啊,已经折腾好几天了,另外还有个事,我的板子是m4的,用上面的m3的h文件真的没问题么。。。可是我没有m4的头文件啊,我自己又不会写T T

最佳答案

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

1,下载最新的例程。 2,用最新的MDK(MDK5.14) 最后:看教程要仔细,我们用什么MDK,你就用什么MDK,否则除非你足够熟练,不然就是被虐。
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

530

主题

11万

帖子

34

精华

管理员

Rank: 12Rank: 12Rank: 12

积分
165371
金钱
165371
注册时间
2010-12-1
在线时间
2110 小时
发表于 2015-9-3 22:46:51 | 显示全部楼层
1,下载最新的例程。
2,用最新的MDK(MDK5.14)

最后:看教程要仔细,我们用什么MDK,你就用什么MDK,否则除非你足够熟练,不然就是被虐。
我是开源电子网www.openedv.com站长,有关站务问题请与我联系。
正点原子STM32开发板购买店铺http://openedv.taobao.com
正点原子官方微信公众平台,点击这里关注“正点原子”
回复

使用道具 举报

530

主题

11万

帖子

34

精华

管理员

Rank: 12Rank: 12Rank: 12

积分
165371
金钱
165371
注册时间
2010-12-1
在线时间
2110 小时
发表于 2015-9-3 22:46:51 | 显示全部楼层
回复【4楼】正点原子:
---------------------------------
对了,还有可能是MDK安装在中文路径下了。。。
我是开源电子网www.openedv.com站长,有关站务问题请与我联系。
正点原子STM32开发板购买店铺http://openedv.taobao.com
正点原子官方微信公众平台,点击这里关注“正点原子”
回复

使用道具 举报

7

主题

22

帖子

0

精华

初级会员

Rank: 2

积分
80
金钱
80
注册时间
2015-8-16
在线时间
3 小时
 楼主| 发表于 2015-9-4 01:06:25 | 显示全部楼层
回复【2楼】正点原子:
---------------------------------
是因为不是最新的MDK么,那用那个m3的头文件没问题么,还用将连接中的那个头文件考进去么
附:由于某种原因我用的是st-link,不是j-link。。。可以么,有什么需要注意的地方么?
回复

使用道具 举报

530

主题

11万

帖子

34

精华

管理员

Rank: 12Rank: 12Rank: 12

积分
165371
金钱
165371
注册时间
2010-12-1
在线时间
2110 小时
发表于 2015-9-4 22:52:05 | 显示全部楼层
回复【3楼】低八度的小白羊:
---------------------------------
这个报错,是mdk版本的问题。
st link也可以的
我是开源电子网www.openedv.com站长,有关站务问题请与我联系。
正点原子STM32开发板购买店铺http://openedv.taobao.com
正点原子官方微信公众平台,点击这里关注“正点原子”
回复

使用道具 举报

12

主题

66

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
314
金钱
314
注册时间
2014-12-26
在线时间
28 小时
发表于 2015-9-6 21:56:35 | 显示全部楼层
cannot open source input file "stdint.h
这种错误的时候,你看下你是否有安装ADS,有可能会和ADS冲突。我之前有遇到过哦。
回复

使用道具 举报

7

主题

22

帖子

0

精华

初级会员

Rank: 2

积分
80
金钱
80
注册时间
2015-8-16
在线时间
3 小时
 楼主| 发表于 2015-9-7 22:11:32 | 显示全部楼层
回复【5楼】正点原子:
---------------------------------
早说啊,虽然这个问题不知道,确实是没有在中文路径下产生了别的问题,纠结了我一周呢。。。(其实怪我,第一遍安装没有中文路径,然后卸载重新装,我就把这事忘了T T,内牛满面的。。。)
回复

使用道具 举报

7

主题

22

帖子

0

精华

初级会员

Rank: 2

积分
80
金钱
80
注册时间
2015-8-16
在线时间
3 小时
 楼主| 发表于 2015-9-7 22:11:56 | 显示全部楼层
回复【6楼】huaiqiao:
---------------------------------
啥都没来及安装呢。。。
回复

使用道具 举报

12

主题

66

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
314
金钱
314
注册时间
2014-12-26
在线时间
28 小时
发表于 2015-9-8 18:41:37 | 显示全部楼层
回复【8楼】低八度的小白羊:
---------------------------------
是你自己的电脑还是单位的电脑,我之前就是单位的电脑上,别人安装了ADS后卸载了,但是还有ADS的环境变量。
回复

使用道具 举报

7

主题

22

帖子

0

精华

初级会员

Rank: 2

积分
80
金钱
80
注册时间
2015-8-16
在线时间
3 小时
 楼主| 发表于 2015-9-8 21:38:55 | 显示全部楼层
回复【9楼】huaiqiao:
---------------------------------
还好吧,是我自己的
回复

使用道具 举报

12

主题

66

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
314
金钱
314
注册时间
2014-12-26
在线时间
28 小时
发表于 2015-9-8 22:02:42 | 显示全部楼层
回复【10楼】低八度的小白羊:
---------------------------------
哦哦,那你再看看咯
回复

使用道具 举报

7

主题

22

帖子

0

精华

初级会员

Rank: 2

积分
80
金钱
80
注册时间
2015-8-16
在线时间
3 小时
 楼主| 发表于 2015-9-8 23:00:42 | 显示全部楼层
回复【11楼】huaiqiao:
---------------------------------
嗯哪
回复

使用道具 举报

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

本版积分规则



关闭

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

正点原子公众号

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

GMT+8, 2025-2-25 06:04

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

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