STM32F103采用GCC和Eclipse编译工具,IOToggle程序报以下错误

2019-07-14 18:04发布

  STM32F103   采用GCC+ Eclipse 编译工具,编译ST官方的IOToggle 程序报以下错误,求解!

./Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.o: In function `SystemInit':
E:workspaceGCCTESTDebug/../Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c:213: multiple definition of `SystemInit'
./User/system_stm32f10x.o:E:workspaceGCCTESTDebug/../User/system_stm32f10x.c:213: first defined here
./Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.o: In function `SystemCoreClockUpdate':
E:workspaceGCCTESTDebug/../Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c:307: multiple definition of `SystemCoreClockUpdate'
./User/system_stm32f10x.o:E:workspaceGCCTESTDebug/../User/system_stm32f10x.c:307: first defined here
c:/users/kevin li/mentorgraphics/sourcery_codebench_lite_for_ARM_eabi/bin/../lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/lib/thumb2libc.a(lib_a-init.o): In function `__libc_init_array':
init.c.text+0x3c): undefined reference to `_init'
collect2.exe: error: ld returned 1 exit status
cs-make: *** [GCCTEST.elf] Error 1

09:38:43 Build Finished (took 10s.198ms)



友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
5条回答
水木清华pretty
1楼-- · 2019-07-14 23:02
我用MDK5.1可以编译, 你看看你的设置是否出错了, 看看哪重复定义了
爱雪爱雪
2楼-- · 2019-07-14 23:23
没有用过GCC+ Eclipse 编译工具,看看是不是你的路径没有定义好
freesea123
3楼-- · 2019-07-15 02:07
你重复添加同一个文件了吧
阿什顿信道
4楼-- · 2019-07-15 04:16
 精彩回答 2  元偷偷看……
cnm7
5楼-- · 2019-07-15 07:54
是编译问题,重新编译下

一周热门 更多>