Compilation errors: Mega 2560

I'm running Windows 10 on a PC and have two Arduino boards: Intel 101 and Mega 2560. The Mega comes up on Com 6 and the 101 on Com 3. I've also verified this (needlessly) on Device Manager | Ports (Com & LPT). I also recently re-installed the IDE. It is 1.6.10.

I'm getting compilation errors for the Mega when I compile Blink. I am getting Blink from the Examples (File|Examples|Basic|Blink). I am seeing expected stuff on the Tools menu. The IDE is setup for the Mega. When I "Get Board Information" I get a popup with information, presumably from a query because the board comes up with a serial number.

I do exactly the same for the 101 board, setting up the IDE for the 101. It compiles and loads as expected.

I turned off VERBOSE because it is very chatty. It appears that I'm missing a component. Here is the error message copied from the IDE:

Arduino: 1.6.10 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

cc1.exe: error: -fno-fat-lto-objects are supported only with linker plugin.

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.

So here are my questions:

  1. What do I need to do to get the compiler to work without an error?
  2. What mechanism selects the COM port or ports?
  3. Could I manually change the COM port on a board if I wanted to? If so, how?

Thank you in advance for the answers.

Take a look at this thread:- Arduino IDE 1.6.10 not compiling anything

Edit: And this one:- Error compiling "plugin needed to handle lto object"

Thank you, OldSteve. That answered the first question nicely. The compilation now works properly, and the software loads.

My friend will be buying and installing a Mega on a MAC later this week. I'll tell him to use 1.6.9.

Two questions remain, and I hope someone can answer them:

  1. What mechanism selects the COM port or ports?
  2. Could I manually change the COM port on a board if I wanted to? If so, how?

Thank you again, Vic

vdolcourt:
Thank you, OldSteve. That answered the first question nicely. The compilation now works properly, and the software loads.

My friend will be buying and installing a Mega on a MAC later this week. I'll tell him to use 1.6.9.

Yep. I'm sticking with V1.6.9 too, until the next fully stable version of the IDE is released. In recent times, the only good ones are V1.6.5 and V1.6.9. :frowning:

Two questions remain, and I hope someone can answer them:

  1. What mechanism selects the COM port or ports?
  2. Could I manually change the COM port on a board if I wanted to? If so, how?

Thank you again, Vic

I don't quite understand 2). The board is allocated a COM port number by the OS, then that port is selected under >Tools >Port in the IDE.

  1. In Windows, you can change the port number allocated to a board in 'Device Manager'.
    Under >Ports, select the board/port, then >Properties >Port Settings >Advanced >COM port number
    Edit: Sorry I can't help with how to do it on a Mac - I've never used one.

Thank you! Really appreciate all of the help. I think I'll fall back to the .9 version. Vic

vdolcourt:
Thank you! Really appreciate all of the help. I think I'll fall back to the .9 version. Vic

No worries. Glad I could help. :slight_smile: