Firmware update on new install fails: Error compiling for board Arduino/Genuino Mega or Mega 2560

I am following the instructions to upload the firmware to a new board that I have just received. I am running Arduino 1.8.9 on a Windows 10 64bit PC. I have downloaded the latest firmware version, after installing the latest IDE. I extracted the files, then loaded up the sketch as instructed. I have set the board to ’ Mega or Mega 2560’ and can connect to it on Com6:. When I try to upload the files it crashes with the following error:

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

sketch\Kinematics.cpp: In function ‘_YOffsetEqn.constprop’:

sketch\Kinematics.cpp:425:1: internal compiler error: Segmentation fault

  • }*

  • ^*

Please submit a full bug report,

with preprocessed source if appropriate.

See 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.

Can someone tell me what I am doing wrong & if my board is good?

When I do a ‘Get board Info’ it gives me the following, so it looks like the comms are good:

BN: Arduino/Genuino Mega or Mega 2560
VID: 0x2341
PID: 0x0042
SN: 55**********************

Looks like the app version. Give the desktop version a try.

Check also if post #4 could be of help

This looks like a problem with the arduino IDE install, not with the board. If
you hit the check (compile) icon instead of the upload icon, I’d bet that you
get the same error.

David Lang

Thanks,. Yes I had clicked the App installer instead of the full version, which I have now done it looks like everything is working. I can now connect to it in Ground Control & all the motors turn when I do the Test Motor thing