fulin.work 发表于 2016-1-19 10:00:02

linking时出现的问题

linking...
d:/keil_v5/arm/5.2_2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: cannot find entry symbol _start; defaulting to 00008000
./objects/startup_stm32f0xx.o: (.text+0x0): undefined reference to `_sidata'
./objects/startup_stm32f0xx.o: (.text+0x4): undefined reference to `_sdata'
./objects/startup_stm32f0xx.o: (.text+0xc): undefined reference to `_sbss'
./objects/startup_stm32f0xx.o: (.text+0x10): undefined reference to `_ebss'
./objects/startup_stm32f0xx.o: In function `LoopFillZerobss':
E:\STM32F0\project/../Libraries/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc_ride7/startup_stm32f0xx.s:101: undefined reference to `SystemInit'
E:\STM32F0\project/../Libraries/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc_ride7/startup_stm32f0xx.s:76: undefined reference to `_sidata'
E:\STM32F0\project/../Libraries/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc_ride7/startup_stm32f0xx.s:82: undefined reference to `_sdata'
E:\STM32F0\project/../Libraries/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc_ride7/startup_stm32f0xx.s:87: undefined reference to `_sbss'
E:\STM32F0\project/../Libraries/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc_ride7/startup_stm32f0xx.s:97: undefined reference to `_ebss'
./objects/startup_stm32f0xx.o: (.isr_vector+0x0): undefined reference to `_estack'
collect2.exe: error: ld returned 1 exit status
".\Objects\STM32F051.elf" - 1 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed:00:00:05

以上是linking是出现的报错。
我试过禁止编译Thume指令;clean整个工程,然后重新编译连接。都没成功。
目前使用的IDE是Keil V5+gcc。startup文件用STM32F0xx_StdPeriph_Lib_V1.0.0\Libraries\CMSIS\Device\ST\STM32F0xx\Source\Templates\gcc_ride7的文件。
请问有朋友知道是怎么回事么?请多指教,谢谢。


发表于 2016-1-19 10:53:22

文件加载的不全吧。

党国特派员 发表于 2016-1-19 11:29:57

先用CCARM成了后,再用gcc

JackieLaura 发表于 2016-1-19 13:05:37

缺少链接文件吧。。。。

fulin.work 发表于 2016-1-19 13:16:47

JackieLaura 发表于 2016-1-19 13:05
缺少链接文件吧。。。。

怎样解决呢?

JackieLaura 发表于 2016-1-20 09:56:02

fulin.work 发表于 2016-1-19 13:16
怎样解决呢?

我这里没有这个文件,自己在论坛搜搜

斩龙烈刃 发表于 2017-7-30 21:31:44

JackieLaura 发表于 2016-1-20 09:56
我这里没有这个文件,自己在论坛搜搜

请问链接文件叫什么?

斩龙烈刃 发表于 2017-7-30 21:32:52

可以共享一下工程么?目前我也搭这个环境。

fulin.work 发表于 2017-10-14 10:10:17

斩龙烈刃 发表于 2017-7-30 21:32
可以共享一下工程么?目前我也搭这个环境。

我用stm32 Cube MX直接生成的工程,但是不能编译,所以就不在这里提供了,毕竟真的不能用。对不起了。
页: [1]
查看完整版本: linking时出现的问题