Welcome! Log In Create A New Profile

Advanced

Problems with Marlin 2.0.3 compiling - Mega2560 error SOLVED Myself

Posted by TerryD15 
Problems with Marlin 2.0.3 compiling - Mega2560 error SOLVED Myself
February 05, 2020 11:17AM
Hi,
Working on updating home built DIY Mendel Prusa i3 clone with Marlin 2.0.3 and Ramps 1.4 controller.

I need some technical help here. On my desktop PC I configured my newly downloaded copy of Marlin 2.0.3 today - I had cleared my PC of every Marlin file before installing the new version. I opened Marlin.ino in a newly installed Arduino IDE version 1.8.11. After configuring each item which I changed, I verified the firmware so that I could isolate any problems individually as I went along. On the final verification the firmware compiled without error (I did have a problem with the RepRapDiscount Full Graphical controller initially but sorted that).

I then took the configured firmware loaded onto a thumb drive and opened it on the PC attached to my printer. When I verified it I was surprised to get an error message reporting problems with linking to the Arduino Mega 2560. Thinking that I might be missing some files on that PC in order to checkI returned to my study PC (printer is in detached garage) and was surprised to get the same error message despite it verifying correctly earlier.

This is the message I got after it had verified the firmware and when Arduino was linking it together.:


Linking everything together...
"C:\\Users\\Terry\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino5/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections,--relax -mmcu=atmega2560 -o
"C:\\Users\\Terry\\AppData\\Local\\Temp\\arduino_build_828547/Marlin.ino.elf"
"C:\\Users\\Terry\\AppData\\Local\\Temp\\arduino_build_828547\\sketch\\Marlin.ino.cpp.o"
"C:\\Users\\Terry\\AppData\\Local\\Temp\\arduino_build_828547/core\\core.a"
"-LC:\\Users\\Terry\\AppData\\Local\\Temp\\arduino_build_828547" -lm
C:\Users\Terry\AppData\Local\Temp\ccgDt77s.ltrans0.ltrans.o: In function `main':



C:\Users\Terry\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2\cores\arduino/main.cpp:43: undefined reference to `setup'

C:\Users\Terry\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2\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.
Error compiling for board Arduino Mega or Mega 2560
.


The top 5 lines were all on one but I separated them for clarity. I have investigated the files indicated in the error message but am not a programmer and can't see where the problem is. The mystifying thing is that it verified on my study PC at first but came up with the error a second time I tried verifying it. I have attached a zipped copy of my configuration.h for possible testing.

Here's hoping that some good Samaritan takes pity on a tyro and I would be glad of any help and advice as my poor hair is disappearing as I tear it out.winking smiley

Terry D

Edited 2 time(s). Last edit at 02/06/2020 11:28AM by TerryD15.
Attachments:
open | download - Configuration.zip (26.9 KB)
Re: Problems with Marlin 2.0.3 compiling - Mega2560 error
February 06, 2020 11:28AM
Solved elsewhere
Re: Problems with Marlin 2.0.3 compiling - Mega2560 error
April 25, 2020 12:05PM
Hello Terry, I have that same problem. How was it solved?
Thanks.
Re: Problems with Marlin 2.0.3 compiling - Mega2560 error SOLVED Myself
April 25, 2020 12:51PM
I suspect they only extracted the some files and not all files from the zip archive.
Re: Problems with Marlin 2.0.3 compiling - Mega2560 error SOLVED Myself
April 26, 2020 04:54PM
Quote
Dust
I suspect they only extracted the some files and not all files from the zip archive.

I downloaded the release version zip file from Marlinfw.org. The standard version without all of the extras and not the LITE either.
I did an "Extract here" which would have extracted all of the files.
Did an install of Martin and got that same error as Terry D.
All of this on a Raspberry Pi 2 Model B. With a 32Gb SD card.

Terry's job is apparently on an MS Windows box.

I also tried this install on my Win10 box and it compiled and uploaded to an Arduino Mega 2560 Rev 3 just fine. No errors.

So I don't think it is a problem with unzipped files.
Sorry, only registered users may post in this forum.

Click here to login