Welcome! Log In Create A New Profile

Advanced

FNG problems

Posted by Kovachs2020 
FNG problems
March 12, 2020 02:50PM
Hello, this is my first post to the forum though not necessarily new to Reprap or Arduino themselves, and while I may have the mechanical and engineering backgrounds I've only ever dabbled in coding before.

My printer WAS fully functional until I finally decided to update Adruino IDE and go to Marlin 2.04, I'm assuming I did something stupid out of ignorance for the newer Marlin and/or IDE version. The frame is fine, the calibration WAS fine, and everything was running smoothly until this upgrade. Any insight would be greatly appreciated. Here is my error message:




Arduino: 1.8.12 (Windows 10), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\sunew\OneDrive\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\sunew\OneDrive\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -ide-version=10812 -build-path C:\Users\sunew\AppData\Local\Temp\arduino_build_970389 -warnings=none -build-cache C:\Users\sunew\AppData\Local\Temp\arduino_cache_14650 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino5.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\sunew\OneDrive\Desktop\Printer Firmware Instalation\MetaIs_Marlin_2.04\MetaIs_Marlin_2.04.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\sunew\OneDrive\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\sunew\OneDrive\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -ide-version=10812 -build-path C:\Users\sunew\AppData\Local\Temp\arduino_build_970389 -warnings=none -build-cache C:\Users\sunew\AppData\Local\Temp\arduino_cache_14650 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino5.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\sunew\OneDrive\Desktop\Printer Firmware Instalation\MetaIs_Marlin_2.04\MetaIs_Marlin_2.04.ino
Using board 'mega' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Detecting libraries used...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10812 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\mega" "C:\\Users\\sunew\\AppData\\Local\\Temp\\arduino_build_970389\\sketch\\MetaIs_Marlin_2.04.ino.cpp" -o nul
Generating function prototypes...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10812 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\mega" "C:\\Users\\sunew\\AppData\\Local\\Temp\\arduino_build_970389\\sketch\\MetaIs_Marlin_2.04.ino.cpp" -o "C:\\Users\\sunew\\AppData\\Local\\Temp\\arduino_build_970389\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\sunew\\AppData\\Local\\Temp\\arduino_build_970389\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10812 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\mega" "C:\\Users\\sunew\\AppData\\Local\\Temp\\arduino_build_970389\\sketch\\MetaIs_Marlin_2.04.ino.cpp" -o "C:\\Users\\sunew\\AppData\\Local\\Temp\\arduino_build_970389\\sketch\\MetaIs_Marlin_2.04.ino.cpp.o"
Compiling libraries...
Compiling core...
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\wiring_pulse.S.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\hooks.c.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\wiring_pulse.c.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\WInterrupts.c.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\wiring_shift.c.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\wiring_analog.c.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\wiring_digital.c.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\wiring.c.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\PluggableUSB.cpp.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\CDC.cpp.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\HardwareSerial.cpp.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\HardwareSerial2.cpp.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\HardwareSerial1.cpp.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\HardwareSerial0.cpp.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\WString.cpp.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\IPAddress.cpp.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\WMath.cpp.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\abi.cpp.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\new.cpp.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\HardwareSerial3.cpp.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\Tone.cpp.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\Print.cpp.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\main.cpp.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\Stream.cpp.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\USBCore.cpp.o
Using previously compiled file: C:\Users\sunew\AppData\Local\Temp\arduino_build_970389\core\core.a
Archiving built core (caching) in: C:\Users\sunew\AppData\Local\Temp\arduino_cache_14650\core\core_arduino_avr_mega_cpu_atmega2560_0c812875ac70eb4a9b385d8fb077f54c.a
Linking everything together...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections,--relax -mmcu=atmega2560 -o "C:\\Users\\sunew\\AppData\\Local\\Temp\\arduino_build_970389/MetaIs_Marlin_2.04.ino.elf" "C:\\Users\\sunew\\AppData\\Local\\Temp\\arduino_build_970389\\sketch\\MetaIs_Marlin_2.04.ino.cpp.o" "C:\\Users\\sunew\\AppData\\Local\\Temp\\arduino_build_970389/core\\core.a" "-LC:\\Users\\sunew\\AppData\\Local\\Temp\\arduino_build_970389" -lm
C:\Users\sunew\AppData\Local\Temp\ccO2ZjNV.ltrans0.ltrans.o: In function `main':

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/main.cpp:43: undefined reference to `setup'

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/main.cpp:46: undefined reference to `loop'

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino Mega or Mega 2560.
Re: FNG problems
March 12, 2020 02:51PM
Just to clarify, I have absolutely no idea how to read the error output, so if you could simplify or explain anything that needs to be I would greatly appreciate that as well.
Re: FNG problems
March 19, 2020 05:25PM
Linking everything together...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections,--relax -mmcu=atmega2560 -o "C:\\Users\\sunew\\AppData\\Local\\Temp\\arduino_build_970389/MetaIs_Marlin_2.04.ino.elf" "C:\\Users\\sunew\\AppData\\Local\\Temp\\arduino_build_970389\\sketch\\MetaIs_Marlin_2.04.ino.cpp.o" "C:\\Users\\sunew\\AppData\\Local\\Temp\\arduino_build_970389/core\\core.a" "-LC:\\Users\\sunew\\AppData\\Local\\Temp\\arduino_build_970389" -lm

this is the command that is failing. the linker. the last step to compilation of the C programming language. arduino is based on C but a lot of it is abstracted away from the user.

C:\Users\sunew\AppData\Local\Temp\ccO2ZjNV.ltrans0.ltrans.o: In function `main':

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/main.cpp:43: undefined reference to `setup'

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/main.cpp:46: undefined reference to `loop'

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino Mega or Mega 2560.

this is actually super useful although we still need to dig more to get the answer we at least have an error message which is a lot better than no error message. exit status 0 is all good. you never see this because it is not an error. exit status 1 means program exited with error. this is repeated by the description of the error message in case it wasn't clear that it had an error. the error message tells you it had an error and could not compile. we already know this from above where the linker failed.

step by step now same error message
C:\Users\sunew\AppData\Local\Temp\ccO2ZjNV.ltrans0.ltrans.o: In function `main':
this is the output file that has a variable or function "main" that is undefined. I'm not sure if you can read it though because it could be machine code right before it hits the linker. maybe you can.


C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/main.cpp:43: undefined reference to `setup'

line 43 of temporary file C:\Users\sunew\AppData\Local\Temp\ccO2ZjNV.ltrans0.ltrans.o

this is a temporary file that you generated when you attempted to compile. go dig it out and post it here. I don't currently have ardiuno IDE to test but I know a little bit about compiling with C. I use eclipse, VS code, visual studio, GCC, conda, jupyter, mathematica, ozone, notepad++ whatever I need for work.

Edited 2 time(s). Last edit at 03/19/2020 05:27PM by longbeardpolymer.
Sorry, only registered users may post in this forum.

Click here to login