I don't know where else to ask this but...

hello! I own a tevo tarantula and recently did two things, one good one bad, first, the bad. I fried one of my motor controllers by accident, and the good was that I purchased a replacement board along with the parts to do upgrade to a dual z axis. I have everything physically set up, but marlin is refusing to compile and/or upload to the new board it gives me this error:

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

sketch\src\lcd\menu\menu.cpp: In static member function 'static void MarlinUI::save_previous_screen()':

sketch\src\lcd\menu\menu.cpp:86:44: warning: narrowing conversion of 'encoderTopLine' from 'int8_t {aka signed char}' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]

screen_history[screen_history_depth++] = { currentScreen, encoderPosition, encoderTopLine, screen_items };

^

sketch\src\lcd\menu\menu.cpp:86:44: warning: narrowing conversion of 'screen_items' from 'int8_t {aka signed char}' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]

sketch\src\module\planner.cpp: In function 'set_machine_position_mm':

sketch\src\module\planner.cpp:2836:1: internal compiler error: Segmentation fault

}

^

Please submit a full bug report,

with preprocessed source if appropriate.

See http://gcc.gnu.org/bugs.html for instructions.

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

compilation terminated.

c:/program files/windowsapps/arduinollc.arduinoide_1.8.21.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.

I am a coding noob to the highest degree. I don't know how to read this or how to decipher the main section. how would I fix this? I have downloaded a fresh copy of marlin and tried doing it with that, but it resulted in the same outcome.

I know these are forums for mainly arduino issues, but I was directed here by a couple of people on the 3d printing subreddit, so I thought I'd ask what the error meant at least.

Thank you for any help, and if I missed something you need to answer my question, ask and I'll see if I can find it.

That looks like the compiler bug in the newest versions of the official AVR board package.

Tools -> Board -> Boards Manager, go to Official AVR Boards package, select 1.6.21, and install that version, then restart the IDE (that's the last version before the problematic compiler version)

It's either that, or some weird issue related to it being a windows store installation (windows store installs have a higher incidence of issues that don't reproduce on all systems and seem to defy explanation)

tried to upload it to the board, got this error:

Sketch uses 148318 bytes (58%) of program storage space. Maximum is 253952 bytes.
Global variables use 4717 bytes (57%) of dynamic memory, leaving 3475 bytes for local variables. Maximum is 8192 bytes.
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
An error occurred while uploading the sketch

seems like an issue with the board or connection to it. according to the Amazon page its an Atmega2560, and I've got that selected in the board menu. Any idea what that could be? change usb port? change usb cable?
thanks for the help. got over at least one issue.

Maybe there is no bootloader on the 2560.

Any solution? I'm a noob with this stuff.

Bootloaders as well as sketches can be programmed via the ICSP header and an AVR ISP or an Arduino as ISP.

Search on Youtube for "tevo tarantula bootloader".

Maybe there would some advice on the RepRap Forum which is all about 3D printers?

...R

their sign up system is messed up and it needs a human verification which I haven't received yet.

this is the only thing I found and I don't have the thing to do that, I'd have to order one, should I try a return? I'm still within the 30 days Amazon allows.

Are you using the correct version of the IDE to do the compile? Marlin is VERY fussy about compiler version... I last built it using v1.8.8 about 4 weeks ago. Check the release notes for the CORRECT compiler to use for the source you're building.

Regards,
Ray L.

tried loading it up with 1.8.8. didn't make a difference, got the same error.

RayLivingston:
Are you using the correct version of the IDE to do the compile? Marlin is VERY fussy about compiler version... I last built it using v1.8.8 about 4 weeks ago. Check the release notes for the CORRECT compiler to use for the source you're building.

The compiler error was already fixed by Franscis following DrAzzy's instructions. We're now on to an upload error. So this has nothing to do with the Marlin code or the compiler version (though the earlier compilation error was indeed about compiler version). The upload error is more likely to be something about hardware.

@Franscis, make sure you have selected the port of your Arduino board from the Tools > Port menu. Sometimes the port will be labeled with the board name in the menu. Other times it will not. If you don’t know which port is your Arduino, you can find it like this:

  • Unplug your Arduino board from the computer.
  • Tools > Port
  • Note the ports, if any, listed in the menu.
  • Close the Tools menu
  • Plug your Arduino board into the computer.
  • Tools > Port - The new port listed in the menu is your Arduino board.

If the Tools > Port menu is grayed or the port of your Arduino does not appear on the menu:

  • Make sure your USB cable is fully inserted into the Arduino board and the computer.
  • You may need to install the driver for the USB-serial chip on your Arduino.
  • You may be using a charge-only or defective USB cable. Try a different cable or test your cable on another device to confirm that it works for data.
  • If you have a board with native USB (e.g. Leonardo, Micro, MKR), see TODO: add link to instructions for reset during upload fix
  • Some Arduino boards are shipped with their pins pressed into a black anti-static foam. This foam is conductive and so you must remove it before using your board.
  • Using a USB 3.0 port on your computer may cause problems. Try a USB 2.0 port.

I am pretty confident that I have the right port. I am using the same port as I used with the old board and it shows up the same as the old one, under the name "com 4". If I unplug the cord, it disappears, so it's not a different device.

as for that list: its plugged in well.

how would I update those drivers? I don't know if that would be it, but I haven't updated anything

The usb cable works, and it's not a charge only cable, it worked with the old board and other things I connect to it.

the board's an mks v1.5, so it has native usb. It's practically the same board as the stock tevo board. link to the board:

There is no foam on the board.

using usb 2.

Keep in mind that you fried the earlier board.
It’s quite possible that event (whatever it was), might have taken out one of the serial pins on the chip.
Keep your wiring as-is.
See if you can upload a simple blink sketch to verify comms and that the Arduino is ‘still there’.

Then you know the upload should work for any other sketch.

I just fried one of the motor controllers on the board, everything else still worked, I even got it printing. now I've got stuff to do an upgrade, it's all installed, and the board is the last thing to set up

just tried running a blink program and got the connectivity error back, could it just be a bad board? I've only got a few days left to return it.

If you’re confident the Tools, board & port configuration and bootloader are correct...

Then you have to decide whether fried the board, or it was shipped that way.

Honestly, I suspect the former.

I may not be great at programming, but I'm at least decent with assembling stuff. and the board turns on, there is a little red light on it, just doesn't respond, and this board shows no physical signs of being damaged.

I am just going to return it. It has caused me enough strife, as I tried to fix it myself without knowing too much, and I'll try with another board later. Thanks for trying to help anyone who sees this and did.

The red light is only indicating that +Vcc is available.
The problem with microelectronics is that things go pfft - without any visible sign.

(over/under-voltage, static, draw too much current, temperature etc... they all count)

Assembly is getting more and more critical as technology evolves.
Perfect first time - or there's a high chance there won't be another try!

Good luck.