Can't compile for Uno WiFi Rev 2

I've just received a new (Genuine) Uno WiFi Rev2. The IDE is running Rev 1.8.8, I have V 1.6.23 of the megaAVR tool set installed and have selected "Arduino Uno WiFi Rev 2" as my board.

I have written a simple sketch to print out a table of ASCII codes so the only system calls are to;

Nothing too onerous there!! No libraries are explicitly included.

When I compile I get the following message/information;
Arduino: 1.8.8 (Linux), Board: "Arduino Uno WiFi Rev2, ATMEGA328"

Build options changed, rebuilding all
avr-g++: error: device-specs/specs-atmega4809: No such file or directory
exit status 1
Error compiling for board Arduino Uno WiFi Rev2.

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

Sifting through the output with "Show Verbose......" selected i found the following line;

Error while detecting libraries included by /tmp/arduino_build_966585/sketch/Sketch1.ino.cpp

Can anyone tell me what's going wrong?

Forgot to mention, I also have the WiFiNINA library installed also that I'm using a Linux box as host. It appears to compile fine on Windows 10.

This indicates something has gone wrong with your Arduino megaAVR Boards installation. To make sure it has been fully uninstalled you need to take some drastic action. Be aware this is somewhat advanced and will remove all boards you have installed via Boards Manager:

  • Click the link on the line following File > Preferences > More preferences can be edited directly in the file. This will open the Arduino15 (or similar name depending on OS) folder.
  • Delete all files and folders under the Arduino15 folder except for preferences.txt. Please be very careful when deleting things from your computer. When in doubt, back up!
  • (In the Arduino IDE) Tools > Board > Boards Manager
  • Wait for the downloads to finish.
  • Scroll down until you see the Arduino megaAVR Boards entry. Click on it.
  • Install any other boards that you need.
  • Click "Install".
  • Wait for installation to finish.
  • Click "Close"

Sadly no joy. Been through the whole process but still getting the same result. What I did notice, however, is that the Linux Tools file is much smaller than the Windows version (~31Mb against ~46Mb)
Even went through the whole thing as root to eliminate any permissions issues.

Do you have an antivirus running on the computer that can’t compile?

No, it's a network booted Raspberry Pi 3B+. This is the first problem I've ever had with it; works fine with my mega2560.

The system config is as follows;

Development host : Network booted Raspberry Pi 3B+
IDE : Arduino 1.8.8
Target : Uno WiFi Rev 2

This configuration has worked for months (and continues to work perfectly) with a mega 2560

In order to eliminate any spurious issues I've gone right back to basics and am using the example 'blink' sketch completely unmodified.

Whenever I try to compile I receive the following error;

Arduino: 1.8.8 (Linux), Board: "Arduino Uno WiFi Rev2, None (ATMEGA4809)"

avr-g++: error: device-specs/specs-atmega4809: No such file or directory
exit status 1
Error compiling for board Arduino Uno WiFi Rev2.

Sifting through the verbose output I find;

Error while detecting libraries included by /tmp/arduino_build_426734/sketch/Blink.ino.cpp

It's quite right, specs-atmega4809 doesn't exists. Changing "Registers Emulation" to ATMEGA328 makes no difference.

It was suggested that the installation of the megaAVR tools may have gone wrong so I have deleted the files from .../Arduino15/ except for preferences.txt and re-run the installation. I have also repeated this process as root to eliminate any permissions issues.

There is no virus protection running on this machine. On my Windows 10 PC which does have a full anti-virus, firewall etc protection scheme operating, It will compile and run but I get numerous warnings of "initialization discards 'volatile' qualifier" from the "getPINnCTRLregister()" macro. (which is another issue altogether, at least it compiles!!)

Any ideas anyone?

Please note, I posted this issue on the main Installation and Troubleshooting group before I found this WiFi Rev 2 specific group so apologies for the duplication.

Additional info: the g++ command line is calling -mmcu=atmega4809 but I don't know how this is derived.

@jwalters1955, please do not cross-post. Threads merged.

There appears to be some big differences in the way the Linux and Windows packages are configured. If I follow this path on both machines (swapping / for \ )


I find numerous 'specs-atmeg.....' files but 'specs-atmega4808' and 'specs-atmega4809' are missing and appear to be the only ones which are.

Copy specs-atmega4809 across and we get further. Now it complains iom4809.h is missing.

It's looking to me very much like the all of the config files required for the Uno WiFi Rev2 board are missing from the board support package

I investigated the issue and I confirm. This problem is isolated to the Linux ARM version of avr-gcc 5.4.0-atmel3.6.1-arduino2.

I submitted an issue report here:

Thanks for reporting the problem jwalters1955.