Welcome! Log In Create A New Profile

Advanced

Error compiling for board

Posted by ethan--cao 
Error compiling for board
January 04, 2019 01:46AM
Hi,

I am new to Marlin and just finished setting up the configuration file, but whenever I try to compile the code I get the following error

C:\Users\ethan\AppData\Local\Temp\ccFKhzde.ltrans3.ltrans.o: In function `position_is_reachable_by_probe(float const&, float const&) [clone .isra.1] [clone .lto_priv.164]':

: (.text+0x6fa): undefined reference to `TMC2130Stepper::getOTPW()'

C:\Users\ethan\AppData\Local\Temp\ccFKhzde.ltrans3.ltrans.o: In function `void tmc_report_otpw(TMC2130Stepper&, TMC_AxisEnum)':

: (.text+0x750): undefined reference to `TMC2130Stepper::getCurrent()'

C:\Users\ethan\AppData\Local\Temp\ccFKhzde.ltrans3.ltrans.o: In function `void tmc_set_current(TMC2130Stepper&, int)':

: (.text.unlikely+0x18): undefined reference to `TMC2130Stepper::setCurrent(unsigned int, float, float)'

C:\Users\ethan\AppData\Local\Temp\ccFKhzde.ltrans4.ltrans.o: In function `tmc2130_init(TMC2130Stepper&, unsigned int, unsigned int, unsigned long, float) [clone .constprop.63]':

: (.text+0x1cdc): undefined reference to `TMC2130Stepper::begin()'

: (.text+0x1cf6): undefined reference to `TMC2130Stepper::setCurrent(unsigned int, float, float)'

: (.text+0x1d00): undefined reference to `TMC2130Stepper::microsteps(unsigned int)'

: (.text+0x1d08): undefined reference to `TMC2130Stepper::blank_time(unsigned char)'

: (.text+0x1d10): undefined reference to `TMC2130Stepper::toff(unsigned char)'

: (.text+0x1d18): undefined reference to `TMC2130Stepper::intpol(bool)'

: (.text+0x1d20): undefined reference to `TMC2130Stepper::TPOWERDOWN(unsigned char)'

: (.text+0x1d28): undefined reference to `TMC2130Stepper::hysteresis_start(unsigned char)'

: (.text+0x1d30): undefined reference to `TMC2130Stepper::hysteresis_end(signed char)'

: (.text+0x1d38): undefined reference to `TMC2130Stepper::pwm_freq(unsigned char)'

: (.text+0x1d40): undefined reference to `TMC2130Stepper::pwm_autoscale(bool)'

: (.text+0x1d48): undefined reference to `TMC2130Stepper::pwm_grad(unsigned char)'

: (.text+0x1d50): undefined reference to `TMC2130Stepper::pwm_ampl(unsigned char)'

: (.text+0x1d58): undefined reference to `TMC2130Stepper::en_pwm_mode(bool)'

: (.text+0x1d6a): undefined reference to `TMC2130Stepper::GSTAT()'

C:\Users\ethan\AppData\Local\Temp\ccFKhzde.ltrans17.ltrans.o: In function `global constructors keyed to 65535_0_G26_Mesh_Validation_Tool.cpp.o.6491':

: (.text.startup+0x72): undefined reference to `TMC2130Stepper::TMC2130Stepper(unsigned int, unsigned int, unsigned int, unsigned int)'

: (.text.startup+0x8a): undefined reference to `TMC2130Stepper::TMC2130Stepper(unsigned int, unsigned int, unsigned int, unsigned int)'

: (.text.startup+0xa2): undefined reference to `TMC2130Stepper::TMC2130Stepper(unsigned int, unsigned int, unsigned int, unsigned int)'

: (.text.startup+0xba): undefined reference to `TMC2130Stepper::TMC2130Stepper(unsigned int, unsigned int, unsigned int, unsigned int)'

C:\Users\ethan\AppData\Local\Temp\ccFKhzde.ltrans12.ltrans.o: In function `MarlinSettings::report(bool)':

: (.text+0x8fc): undefined reference to `TMC2130Stepper::getCurrent()'

: (.text+0x90e): undefined reference to `TMC2130Stepper::getCurrent()'
 
: (.text+0x920): undefined reference to `TMC2130Stepper::getCurrent()'

: (.text+0x93a): undefined reference to `TMC2130Stepper::getCurrent()'

C:\Users\ethan\AppData\Local\Temp\ccFKhzde.ltrans18.ltrans.o: In function `gcode_M912()':

: (.text+0x56): undefined reference to `TMC2130Stepper::clear_otpw()'

: (.text+0x86): undefined reference to `TMC2130Stepper::clear_otpw()'

: (.text+0xb4): undefined reference to `TMC2130Stepper::clear_otpw()'

: (.text+0xe2): undefined reference to `TMC2130Stepper::clear_otpw()'

collect2.exe: error: ld returned 1 exit status

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

could someone try to help me?

Thanks,
Ethan
Re: Error compiling for board
January 04, 2019 02:01AM
Did you install the TMC2130Stepper library ? [github.com]
Re: Error compiling for board
January 04, 2019 03:17PM
No I did not install the library, but after I install it, I get a different error message

Arduino: 1.8.8 (Windows Store 1.8.19.0) (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

libraries\TMC2130Stepper-master\source\SW_SPI.cpp.o (symbol from plugin) : In function `SW_SPIClass::setPins(unsigned int, unsigned int, unsigned int)':

(.text+0x0): multiple definition of `SW_SPIClass::setPins(unsigned int, unsigned int, unsigned int)'

sketch\SW_SPI.cpp.o (symbol from plugin): (.text+0x0) : first defined here

c:/program files/windowsapps/arduinollc.arduinoide_1.8.19.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions

libraries\TMC2130Stepper-master\source\SW_SPI.cpp.o (symbol from plugin) : In function `SW_SPIClass::setPins(unsigned int, unsigned int, unsigned int)':

(.text+0x0): multiple definition of `SW_SPIClass::init()'

sketch\SW_SPI.cpp.o (symbol from plugin) : (.text+0x0) : first defined here

libraries\TMC2130Stepper-master\source\SW_SPI.cpp.o (symbol from plugin) : In function `SW_SPIClass::setPins(unsigned int, unsigned int, unsigned int)':

(.text+0x0): multiple definition of `SW_SPIClass::transfer(unsigned char, unsigned char)'

sketch\SW_SPI.cpp.o (symbol from plugin) : (.text+0x0) : first defined here

libraries\TMC2130Stepper-master\source\SW_SPI.cpp.o (symbol from plugin) : In function `SW_SPIClass::setPins(unsigned int, unsigned int, unsigned int)':

(.text+0x0): multiple definition of `SW_SPIClass::transfer16(unsigned int)'

sketch\SW_SPI.cpp.o (symbol from plugin) : (.text+0x0) : first defined here

libraries\TMC2130Stepper-master\source\SW_SPI.cpp.o (symbol from plugin) : In function `SW_SPIClass::setPins(unsigned int, unsigned int, unsigned int)':

(.text+0x0): multiple definition of `TMC_SW_SPI'

sketch\SW_SPI.cpp.o (symbol from plugin) : (.text+0x0) : first defined here

sketch\ultralcd.cpp: In function 'menu_action_setting_edit_callback_long5.constprop':

sketch\ultralcd.cpp:4860:3: internal compiler error: Segmentation fault

   DEFINE_MENU_EDIT_TYPE(uint32_t, long5, ftostr5rj, 0.01f);

   ^

Please submit a full bug report,

with preprocessed source if appropriate.

See [gcc.gnu.org] for instructions.

lto-wrapper.exe: fatal error: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc returned 1 exit status

compilation terminated.

c:/program files/windowsapps/arduinollc.arduinoide_1.8.19.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed

collect2.exe: error: ld returned 1 exit status

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

do you know what this means?
Re: Error compiling for board
January 04, 2019 06:30PM
Why are you trying to use software SPI?

You have a hardware SPI port and the TMC2130's should be wired to that

comment out #define TMC_USE_SW_SPI in Configuration_adv.h
Re: Error compiling for board
January 04, 2019 07:06PM
yes, that line was already commented out.

Ethan
Re: Error compiling for board
January 04, 2019 07:12PM
Please post your two configuration files.
Re: Error compiling for board
January 04, 2019 07:28PM
Here are the configuration files

Thanks,
Ethan
Attachments:
open | download - Configuration_adv.h (69 KB)
open | download - Configuration.h (72.3 KB)
Re: Error compiling for board
January 04, 2019 08:19PM
Tried your configuration.h and a fresh copy of marlin with arduino 1.8.8 and it compiled fine for me

looks like you have not made any changes to Configuration_adv.h?


How did you install the libraries? Tools|Manage libraries and enter TMC2130Stepper into the search filter then click install??
Re: Error compiling for board
January 04, 2019 09:51PM
Yes, I did install the files through the library manager
Re: Error compiling for board
January 06, 2019 07:06PM
so,

I redownloaded Marlin and the Stepper motor library and copied in my configuration and configuration_adv files and I get a different error

Arduino: 1.8.8 (Windows Store 1.8.19.0) (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Build options changed, rebuilding all
sketch\ultralcd.cpp: In function 'menu_action_setting_edit_callback_long5.constprop':

sketch\ultralcd.cpp:4860:3: internal compiler error: Segmentation fault

   DEFINE_MENU_EDIT_TYPE(uint32_t, long5, ftostr5rj, 0.01f);

   ^

Please submit a full bug report,

with preprocessed source if appropriate.

See [gcc.gnu.org] for instructions.

lto-wrapper.exe: fatal error: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc returned 1 exit status

compilation terminated.

c:/program files/windowsapps/arduinollc.arduinoide_1.8.19.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed

collect2.exe: error: ld returned 1 exit status

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

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Re: Error compiling for board
January 06, 2019 09:34PM
looks like the arduino ide from the windows store is broken

just use the installer [www.arduino.cc]
Re: Error compiling for board
January 19, 2019 12:30AM
Ok so I installed the software through my mac and it works, however, no text is showing up on my LCD screen, but it does light up, this would most likely be a configuration problem right?

btw thank you so much for the help
Re: Error compiling for board
January 19, 2019 01:22AM
It could be 3 things (presuming its not dead)

1) firmware, you haven't selected the correct type of display
I see you have set #define REPRAP_DISCOUNT_SMART_CONTROLLER
Does you board look like this


2) ardunio add on. You need to install this addon into the arduino ide. The symptoms of not installing it is that the lcd doesnt work.
[reprap.org]
Then select Select Tools -> Board -> Rambo in the arduino IDE (not Arduino/Genuino Mega or Mega 2560)

3) the LCD has a contrast potentiometer on the back, it may just need adjusted

4) (try this last) There is a common issue with LCD's Some of them come with the plugs on upside down. So you have to modify them so you can turn the cables around.
Re: Error compiling for board
January 19, 2019 07:11PM
Yes, I have done all these things and have already flipped the connectors around. I am using the full graphic RepRap discount controller and all the screen does is light up, but it does not display any text.
Re: Error compiling for board
January 19, 2019 09:14PM
full graphic RepRap discount controller is
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
not
#define REPRAP_DISCOUNT_SMART_CONTROLLER

you have latter enabled in the configuration.h above.

Its also requires a library to be installed [github.com]

It looks like this



Edited 2 time(s). Last edit at 01/19/2019 09:17PM by Dust.
Sorry, only registered users may post in this forum.

Click here to login