Error compiling Nano Every

Hi

I'm very new to Arduino and trying to use a Nano Every.

I have written a sketch which Verifies, uploads and runs perfectly when connected to an old 27" iMac running High Sierra 10.13.6

If I then connect the Nano Every to my old Late 2012 MacBook Pro also running 10.13.6 I get "Error compiling board for Arduino Nano Every"

This is the error message:

Arduino: 1.8.16 (Mac OS X), Board: "Arduino Nano Every, None (ATMEGA4809)"

fork/exec /Users/michaelfalter/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/avr-g++: no such file or directory
Error compiling for board Arduino Nano Every.

I would be very grateful for any help and would only request that the advice assumes that I am a complete beginner.

Thank you so much!

What version of the IDE is installed on the Late 2012 MacBook Pro?

@codingcoding, as your topic has nothinh to do with Avrdude, stk500 or Bootloader, it has been moved to a more suitable location on the forum.

Your installation seems to be corrupt. You can try to copy avr-g++ from your working setup to the directory indicated in the error message but you might still encounter other errors. Therefore I would try a re-install of the Nano Every package.

Hi

Version 1.8.16

Hi

Apologies for posting in the wrong place. I'm very new to this and couldn't find a precise match.

I completely reinstalled the Arduino IDE to version 1.8.16 - is that what you had in mind or is there a specific installation for the Nano Every?

Thanks

I just checked the Arduino help and apparently with OSX " OSX No driver installation is necessary on OSX."

Did I miss something?

You have a compile error; there are no drivers involved in that.

Not quite; my intention was to just copy the missing file from the working installation to the non-working installation. But that does not matter. I don't have experience with a Mac; but there is more involved than uinstalling / installing. I think (!) that you also have to clean out /Users/michaelfalter/Library/Arduino15/packages/Arduino after an uninstall.

As far as I know, deleting the Arduino folder deletes everything -0 but I'm always willing to be corrected.

I have deleted and reinstalled. Without loading any sketches I clicked verify on the effectively empty sketch that Arduino presents. And it refused to verify (on the macBook).

In fact, /Users/michaelfalter/Library/Arduino15/packages/Arduino does not even exist !

I'm completely stuck.

I have just copied the whole application from the iMac to the MacBookPro and I get exactly the same results.

Could there be some sort of issue with the IDE and MacBookPro / Late 2012 / High Sierra 10.13.6 ?

It will delete all the Arduino boards platforms you have installed via the Arduino IDE's Boards Manager. You will need to reinstall them after. But, unless you manually put something under that folder, which you would surely remember doing, there is no irreplaceable data stored under that folder and it is easy enough to reinstall the boards in Boards Manager.

I am in agreement with sterretje that this is the best thing to try. It is the most common advice for fixing this sort of problem.

On rare occasions, the installation of an Arduino boards platform via Boards Manager will not complete successfully and you will be left with an incomplete installation. The board definition is there, so you are able to select the board in the Arduino IDE, but the toolchain was not fully installed, so when the IDE tries to call one of the tools such as the avr-g++ compiler, the compilation or upload process fails.

Doing a "Remove"+"Install" cycle via the IDE's Boards Manager GUI won't reliably fix this because it doesn't remove tools and if it sees what looks like an already installed tool dependency (which could even just be an empty folder), it will skip the installation of that tool.

Doing an Arduino IDE uninstall/reinstall cycle won't help because that only replaces the Arduino IDE application. The boards platform installations are not affected at all by that process.

Thank you in0 for your detailed reply.

I have gone as far as my abilities will take me.

As I mentioned above, I have deleted, reinstalled, deleted, copied, deleted and reinstalled and am no further forward. In particular, the directory in question is also not present.

I have tried to install manually install the Arduino megaAVR library but it is not there to install manually. Instead I installed libraries that seemed to contain it (megaAVR_Slow_PWM and megaAVR_TimerInterrupt) but to no effect. The sketch still will not verify for Nano Every boards.

I'm at a loss to know what to do now. Any further help would be appreciated. Thank you

OK, please try this:

  1. Select File > Preferences from the Arduino IDE's menus.
  2. Click the link on the line following "More preferences can be edited directly in the file". This will open the /Users/michaelfalter/Library/Arduino15 folder in Finder.
  3. Delete all files and folders under the Arduino15 folder except for the preferences.txt file. Please be very careful when deleting things from your computer. When in doubt, back up!

Now you will need to re-install the boards you just uninstalled:

  1. Select Tools > Board > Boards Manager from the Arduino IDE's menus.
  2. Wait for the update to finish.
  3. Scroll down through the list of available boards platforms until you see "Arduino megaAVR Boards".
    Click on it.
  4. Click the Install button.
  5. Wait for the installation to finish.
  6. Click the Close button.

Now try compiling a sketch for your Nano Every board. Hopefully the error will no longer occur.

1 Like

SUCCESS!!

Thank you SO much.

It didn't go exactly as you suggested but you gave me so many clues that I eventually found a way.

This is what I did:

I followed instructions 1 and 2 but there were absolutely NO files in Arduino15, so I couldn't delete anything.

The Boards Manager showed that "Arduino megaAVR" was already installed which led me to believe that it had not been installed properly, so I deleted it and then, as you suggested, I installed it.

The installation took a long time, I actually thought it had hung, but eventually it finished and what's more, it worked :grinning:

So, I cannot thank you enough. I am overwhelmed by your generosity in taking so much time, thought and care in helping me to resolve this issue.

I presume that if it happens again (for example after an update) deleting and reinstalling megaAVR should solve the problem?

One further question if I may.

I know that I am stuck on issues surrounding adding a start-stop button, an OLED display and a little stepper problem. Would "Using Arduino / Installation & Troubleshooting" be the correct place to post any further questions?

Once again, THANK YOU

A FOLLOW UP:

I have just re-read your instructions. I clicked the wrong link and not the one you suggested. I clicked the icon at the end of the Additional Boards Manager URLs and NOT the link below it.

Had I clicked the correct link, your instructions would have worked perfectly!

No. For the button, Project Guidance would probably be good. For the OLED, the Displays section and for the stepper, Motors, Mechanics, Power and CNC

1 Like

Thank you!

I'm very glad to hear it is working now!

Maybe. I usually instruct people to just go ahead and clear out the entire Arduino15 folder when they report an error of this sort. Even though it is a bit of an overkill because it deletes files that are surely not related to the problem, but there are several different files and folders that might be related and doing a surgical removal would make the instructions much more complicated.

The only unique data stored in the Arduino15 folder is preferences.txt (the user would need to reconfigure the File > Preferences options from default if they deleted that file), and this is why I instruct people to skip deleting that file. As for the rest, the only harm done by deleting them is that you have to installing them again via Boards Manager. That takes a little time, but it is at least easy to do.

This type of problem is fairly rare. We do get regular reports of it here on the forum, but that is out of many thousands of users. So I don't think you are likely to run into it often. However, it is a useful technique to know. You also might eventually get curious to do some exploration in that Arduino15 folder to learn about how the Arduino boards platforms work under the hood.

Thanks again in0.

Very useful technique and when I get a bit more proficient I will start exploring!

Best wishes