我从这里下载的视频文件和各种资料,然后我打开例程编译,无论是寄存器版本还是库函数都总是编译错误,比如LED的实验,后来参考了原子哥给别人发的帖子http://www.openedv.com/posts/list/10955.htm,结果还是不行,比如库函数版本,错误如下
Build target 'Target 1'
compiling main.c...
..COREcore_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...
..COREcore_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...
..COREcore_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...
..COREcore_cm3.h(90): error: #5: cannot open source input file "stdint.h": No such file or directory
#include <stdint.h> /* Include standard types */
..HARDWARELEDled.c: 0 warnings, 1 error
compiling delay.c...
..COREcore_cm3.h(90): error: #5: cannot open source input file "stdint.h": No such file or directory
#include <stdint.h> /* Include standard types */
..SYSTEMdelaydelay.c: 0 warnings, 1 error
compiling sys.c...
..COREcore_cm3.h(90): error: #5: cannot open source input file "stdint.h": No such file or directory
#include <stdint.h> /* Include standard types */
..SYSTEMsyssys.c: 0 warnings, 1 error
compiling usart.c...
..COREcore_cm3.h(90): error: #5: cannot open source input file "stdint.h": No such file or directory
#include <stdint.h> /* Include standard types */
..SYSTEMusartusart.c: 0 warnings, 1 error
compiling core_cm3.c...
..COREcore_cm3.c(24): error: #5: cannot open source input file "stdint.h": No such file or directory
#include <stdint.h>
..COREcore_cm3.c: 0 warnings, 1 error
compiling stm32f10x_gpio.c...
..COREcore_cm3.h(90): error: #5: cannot open source input file "stdint.h": No such file or directory
#include <stdint.h> /* Include standard types */
..STM32F10x_FWLibsrcstm32f10x_gpio.c: 0 warnings, 1 error
compiling stm32f10x_rcc.c...
..COREcore_cm3.h(90): error: #5: cannot open source input file "stdint.h": No such file or directory
#include <stdint.h> /* Include standard types */
..STM32F10x_FWLibsrcstm32f10x_rcc.c: 0 warnings, 1 error
compiling stm32f10x_usart.c...
..COREcore_cm3.h(90): error: #5: cannot open source input file "stdint.h": No such file or directory
#include <stdint.h> /* Include standard types */
..STM32F10x_FWLibsrcstm32f10x_usart.c: 0 warnings, 1 error
compiling misc.c...
..COREcore_cm3.h(90): error: #5: cannot open source input file "stdint.h": No such file or directory
#include <stdint.h> /* Include standard types */
..STM32F10x_FWLibsrcmisc.c: 0 warnings, 1 error
"..OBJLED.axf" - 12 Error(s), 0 Warning(s).
Target not created
下图是我按照上面的链接添加文件
然后我用寄存器版本也试了一下,结果已哭,如图
然后还是各种报错,我只是个新手,虽说开头万事难,但是我快被虐哭了。。。求救啊,已经折腾好几天了,另外还有个事,我的板子是m4的,用上面的m3的h文件真的没问题么。。。可是我没有m4的头文件啊,我自己又不会写T T
2,用最新的MDK(MDK5.14)
最后:看教程要仔细,我们用什么MDK,你就用什么MDK,否则除非你足够熟练,不然就是被虐。
---------------------------------
对了,还有可能是MDK安装在中文路径下了。。。
---------------------------------
是因为不是最新的MDK么,那用那个m3的头文件没问题么,还用将连接中的那个头文件考进去么
附:由于某种原因我用的是st-link,不是j-link。。。可以么,有什么需要注意的地方么?
---------------------------------
这个报错,是mdk版本的问题。
st link也可以的
一周热门 更多>