Arduino IDE-无法在AVR-GCC中链接已编译的小节

时间:2018-07-16 15:20:36

标签: arduino linker-errors avr arduino-ide avr-gcc

Hello StackOverflow社区,

最近我一直注意到我的Arduino IDE只是无法实际编译并运行到TTN Uno(是较小的Arduino Leonardo),ESP8266(在模块和WeMos中)中的任何板,到Arduino Uno(R3 SmD版本)。

我在IDE的首选项中启用了来自编译器的详细输出。当文件.o文件被压缩为最终的.hex时,崩溃的行是avrdude(或esptool)最终将其推入电路板用来操作的可编程闪存中。

Linking everything together...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p  -o "C:\Users\JTamez\AppData\Local\Temp\arduino_build_806309/sketch_jun27a.ino.elf" "C:\Users\JTamez\AppData\Local\Temp\arduino_build_806309\sketch\sketch_jun27a.ino.cpp.o" "C:\Users\JTamez\AppData\Local\Temp\arduino_build_806309\libraries\DHT-sensor-library\DHT.cpp.o" "C:\Users\JTamez\AppData\Local\Temp\arduino_build_806309\libraries\DHT-sensor-library\DHT_U.cpp.o" "C:\Users\JTamez\AppData\Local\Temp\arduino_build_806309\libraries\TheThingsNetwork\appData.pb.c.o" "C:\Users\JTamez\AppData\Local\Temp\arduino_build_806309\libraries\TheThingsNetwork\deviceData.pb.c.o" "C:\Users\JTamez\AppData\Local\Temp\arduino_build_806309\libraries\TheThingsNetwork\pb_common.c.o" "C:\Users\JTamez\AppData\Local\Temp\arduino_build_806309\libraries\TheThingsNetwork\pb_decode.c.o" "C:\Users\JTamez\AppData\Local\Temp\arduino_build_806309\libraries\TheThingsNetwork\pb_encode.c.o" "C:\Users\JTamez\AppData\Local\Temp\arduino_build_806309\libraries\TheThingsNetwork\CayenneLPP.cpp.o" "C:\Users\JTamez\AppData\Local\Temp\arduino_build_806309\libraries\TheThingsNetwork\TheThingsMessage.cpp.o" "C:\Users\JTamez\AppData\Local\Temp\arduino_build_806309\libraries\TheThingsNetwork\TheThingsNetwork.cpp.o" "C:\Users\JTamez\AppData\Local\Temp\arduino_build_806309\libraries\Timer\Event.cpp.o" "C:\Users\JTamez\AppData\Local\Temp\arduino_build_806309\libraries\Timer\Timer.cpp.o" "C:\Users\JTamez\AppData\Local\Temp\arduino_build_806309/core\core.a" "-LC:\Users\JTamez\AppData\Local\Temp\arduino_build_806309" -lm

wiring.c.o (symbol from plugin): In function `__vector_16':

(.text+0x0): multiple definition of `init'
C:\Users\JTamez\AppData\Local\Temp\arduino_build_806309\sketch\sketch_jun27a.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here


collect2.exe: error: ld returned 1 exit status

我不确定为什么在长时间连续工作后wireing.c现在会引起问题。这是腐败的副作用,还是影响它的外部库?下面列出了我正在使用的所有库:

Using library DHT-sensor-library at version 1.3.0 in folder: C:\Program Files (x86)\Arduino\libraries\DHT-sensor-library 
Using library Adafruit_Sensor at version 1.0.2 in folder: C:\Program Files (x86)\Arduino\libraries\Adafruit_Sensor 
Using library TheThingsNetwork at version 2.5.10 in folder: C:\Users\JTamez\Documents\Arduino\libraries\TheThingsNetwork 
Using library EEPROM at version 2.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM 
Using library Timer in folder: C:\Program Files (x86)\Arduino\libraries\Timer (legacy)

任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:1)

我向所有人道歉,我发现我创建的名为“ init()”的方法正在干扰布线内部的init()。c