在Avr Studio 6中编译项目时出错

时间:2014-02-04 13:46:36

标签: avr atmel atmega

在AVR Studio 6中构建项目时出现以下错误: 400 Id returned 1 exit status collect2.exe

如果我看看我的输出,我有以下内容:

Building target: main.elf
    Invoking: AVR/GNU Linker : 3.4.2
    "C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.1002\avr8-gnu-toolchain\bin\avr-gcc.exe" -o main.elf  eeprom.o panel6.o testmode.o uart.o AT45DB161.o delay.o dtmf.o keypad.o lcd.o main.o mcu.o menu.o remote_rx.o spi.o tx75x.o bootloader.o txcellular.o   -Wl,-Map="main.map" -Wl,--start-group  -Wl,--end-group -Wl,--gc-sections -mmcu=atmega64 
    c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.1002/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(cmpsf2.o):/data2/home/toolsbuild/jenkins-knuth/workspace/avr8-gnu-toolchain/src/avr-libc/libm/fplib/cmpsf2.S:58: multiple definition of `__ltsf2'
    c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.1002/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_lt_sf.o):/data2/home/toolsbuild/jenkins-knuth/workspace/avr8-gnu-toolchain/src/gcc/libgcc/fp-bit.c:1269: first defined here
    c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.1002/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/../../../../avr/lib/avr5\libc.a(cmpsf2.o):/data2/home/toolsbuild/jenkins-knuth/workspace/avr8-gnu-toolchain/src/avr-libc/libm/fplib/cmpsf2.S:58: multiple definition of `__lesf2'
    c:/program files (x86)/atmel/atmel toolchain/avr8 gcc/native/3.4.2.1002/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.7.2/avr5\libgcc.a(_le_sf.o):/data2/home/toolsbuild/jenkins-knuth/workspace/avr8-gnu-toolchain/src/gcc/libgcc/fp-bit.c:1290: first defined here

collect2.exe(0,0): ld returned 1 exit status
make: *** [main.elf] Error 1
The command exited with code 2.


Done executing task "RunCompilerTask" -- FAILED.
Done building target "CoreRebuild" in project "main.cproj" -- FAILED.
Done building project "main.cproj" -- FAILED.

突出的主要错误是:multiple definition of __lesf2' 我对AVR很新,有人可以帮助我。

1 个答案:

答案 0 :(得分:0)

我最终弄清楚出了什么问题所以我只是想说出我做了什么,如果其他人都有同样的问题他们知道该怎么做。

实际上这是一个非常简单的修复方法。

我需要做的就是转到项目属性,链接器,库,然后添加" limb"到了lib。 (我原本是空白的)

这是一张它看起来像什么的图片。

enter image description here