OpenEdv-开源电子网

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

一个新手 第一次建立工程 发现编译后出现了下面错误

[复制链接]

1

主题

3

帖子

0

精华

新手入门

积分
6
金钱
6
注册时间
2019-2-20
在线时间
0 小时
发表于 2019-2-20 22:02:32 | 显示全部楼层 |阅读模式
1金钱
Build target 'LED'
compiling main.c...
main.c(35): warning:  #1-D: last line of file ends without a newline
   
main.c: 1 warning, 0 errors
compiling core_cm3.c...
"no source": Error: command-line:  #564: cannot open embedded assembler output file "C:\Users\YY丶\AppData\Local\Temp\p183c-2": No such file or directory
..\CORE\core_cm3.c: 0 warnings, 1 error
compiling sys.c...
"no source": Error: command-line:  #564: cannot open embedded assembler output file "C:\Users\YY丶\AppData\Local\Temp\p248c-2": No such file or directory
..\SYSTEM\sys\sys.c: 0 warnings, 1 error
linking...
..\OBJ\LED.axf: error: L6002U: Could not open file ..\obj\core_cm3.o: No such file or directory
Finished: 0 information, 0 warning, 0 error and 1 fatal error messages.
"..\OBJ\LED.axf" - 1 Error(s), 1 Warning(s).
Target not created.
Build Time Elapsed:  00:00:03 捕获.JPG

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

使用道具 举报

109

主题

5564

帖子

0

精华

资深版主

Rank: 8Rank: 8

积分
10572
金钱
10572
注册时间
2017-2-18
在线时间
1914 小时
发表于 2019-2-20 22:28:25 | 显示全部楼层
1.电脑该用户名为YY试试
2.上面方法不行的话,可以试试修改环境变量的方法:https://pan.baidu.com/s/1YPc5g87Trf8M8AhqMIkgOQ
1.JPG
回复

使用道具 举报

15

主题

78

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
282
金钱
282
注册时间
2018-4-25
在线时间
45 小时
发表于 2019-2-21 09:09:58 | 显示全部楼层
是不是搭建开发环境的时候文件有漏掉的,或者试试将YY、改为YY
回复

使用道具 举报

6

主题

107

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
374
金钱
374
注册时间
2012-12-30
在线时间
48 小时
发表于 2019-2-21 09:32:45 | 显示全部楼层
把项目放到某个盘的根目录试试
回复

使用道具 举报

3

主题

49

帖子

0

精华

初级会员

Rank: 2

积分
137
金钱
137
注册时间
2018-11-7
在线时间
40 小时
发表于 2019-2-21 11:24:37 | 显示全部楼层
1、试试修改默认的搜索路径,
2、将目录中的中文修改成英文字符。
回复

使用道具 举报

9

主题

123

帖子

0

精华

金牌会员

Rank: 6Rank: 6

积分
1694
金钱
1694
注册时间
2014-7-8
在线时间
183 小时
发表于 2019-2-21 11:28:42 | 显示全部楼层
楼上几位说的都对,另外target option->C/C++里面是否包含了这些文件的地址!
回复

使用道具 举报

4

主题

380

帖子

0

精华

论坛元老

Rank: 8Rank: 8

积分
3088
金钱
3088
注册时间
2015-10-17
在线时间
320 小时
发表于 2019-2-21 11:31:10 | 显示全部楼层
keil有个问题,就是文件最后一行,你要再按下enter,换行一下
回复

使用道具 举报

1

主题

3

帖子

0

精华

新手入门

积分
6
金钱
6
注册时间
2019-2-20
在线时间
0 小时
 楼主| 发表于 2019-2-21 14:17:50 | 显示全部楼层
peng1554 发表于 2019-2-20 22:28
1.电脑该用户名为YY试试
2.上面方法不行的话,可以试试修改环境变量的方法:https://pan.baidu.com/s/1YPc ...

改了之后还是有错误

Build target 'LED'
compiling main.c...
main.c(39): warning:  #1-D: last line of file ends without a newline
   
main.c: 1 warning, 0 errors
compiling stm32f10x_it.c...
compiling system_stm32f10x.c...
assembling startup_stm32f10x_hd.s...
compiling core_cm3.c...
compiling misc.c...
compiling stm32f10x_adc.c...
compiling stm32f10x_bkp.c...
compiling stm32f10x_can.c...
compiling stm32f10x_cec.c...
compiling stm32f10x_crc.c...
compiling stm32f10x_dac.c...
compiling stm32f10x_dbgmcu.c...
compiling stm32f10x_dma.c...
compiling stm32f10x_exti.c...
compiling stm32f10x_flash.c...
compiling stm32f10x_fsmc.c...
compiling stm32f10x_gpio.c...
compiling stm32f10x_i2c.c...
compiling stm32f10x_iwdg.c...
compiling stm32f10x_pwr.c...
compiling stm32f10x_rcc.c...
compiling stm32f10x_rtc.c...
compiling stm32f10x_sdio.c...
compiling stm32f10x_spi.c...
compiling stm32f10x_tim.c...
compiling stm32f10x_usart.c...
compiling stm32f10x_wwdg.c...
compiling delay.c...
compiling sys.c...
compiling usart.c...
linking...
..\OBJ\LED.axf: Error: L6218E: Undefined symbol SysTick_CLKSourceConfig (referred from delay.o).
..\OBJ\LED.axf: Error: L6218E: Undefined symbol NVIC_Init (referred from usart.o).
Not enough information to list image symbols.
Finished: 1 information, 0 warning and 2 error messages.
"..\OBJ\LED.axf" - 2 Error(s), 1 Warning(s).
Target not created.
Build Time Elapsed:  00:00:18
回复

使用道具 举报

1

主题

3

帖子

0

精华

新手入门

积分
6
金钱
6
注册时间
2019-2-20
在线时间
0 小时
 楼主| 发表于 2019-2-21 14:32:24 | 显示全部楼层
xzh5508 发表于 2019-2-21 11:28
楼上几位说的都对,另外target option->C/C++里面是否包含了这些文件的地址!

那应该怎么办呢
回复

使用道具 举报

109

主题

5564

帖子

0

精华

资深版主

Rank: 8Rank: 8

积分
10572
金钱
10572
注册时间
2017-2-18
在线时间
1914 小时
发表于 2019-2-21 14:56:14 | 显示全部楼层
YY丶 发表于 2019-2-21 14:17
改了之后还是有错误

Build target 'LED'

编译例程也是这种错误提示吗?
回复

使用道具 举报

9

主题

123

帖子

0

精华

金牌会员

Rank: 6Rank: 6

积分
1694
金钱
1694
注册时间
2014-7-8
在线时间
183 小时
发表于 2019-2-21 15:44:21 | 显示全部楼层
YY丶 发表于 2019-2-21 14:32
那应该怎么办呢

打开target option ->c/c++ 下面有一个include paths 把那些文件夹到包含进去试试?
回复

使用道具 举报

2

主题

10

帖子

0

精华

新手上路

积分
42
金钱
42
注册时间
2014-7-10
在线时间
1 小时
发表于 2019-2-21 16:38:34 来自手机 | 显示全部楼层
是你选的芯片型号跟固件不一致,改一下就行了,就好比说你选的芯片有4个中断,但是你的库文件调用了6个,就会出现这样的情况,要么换对应的固件库,要么屏蔽掉多余的
回复

使用道具 举报

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

本版积分规则



关闭

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

正点原子公众号

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

GMT+8, 2025-6-23 13:51

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

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