Compilation error Arduino 1.8.3 on W10 64bits

I just installed Arduino 1.8.3 and I am getting the compilation error:

avr-g++: error: cannot access device-specs for 'atmega328p' expected at 'device-specs/specs-atmega328p'

Boar is nano, serial com connection OK, OS=system w10 64b -
The error happens just during compilation.

How to fix that? I have read something that this is due to gcc issue with the folder sequence but I am no th expert.
Please help.

I also have this problem, were you able to find a solution?

When attempting to upload the classic blink program (but the error appears with any program) to my Arduino Uno I get the following error (verbose information included):

Arduino: 1.8.3 (Windows 10), Board: "Arduino/Genuino Uno"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\David\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\David\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\David\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10803 -build-path C:\Users\David\AppData\Local\Temp\arduino_build_759758 -warnings=none -build-cache C:\Users\David\AppData\Local\Temp\arduino_cache_452046 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\David\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -prefs=runtime.tools.arduinoOTA.path=C:\Users\David\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.avrdude.path=C:\Users\David\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -verbose C:\Program Files (x86)\Arduino\examples\01.Basics\Blink\Blink.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\David\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\David\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\David\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10803 -build-path C:\Users\David\AppData\Local\Temp\arduino_build_759758 -warnings=none -build-cache C:\Users\David\AppData\Local\Temp\arduino_cache_452046 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\David\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -prefs=runtime.tools.arduinoOTA.path=C:\Users\David\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.avrdude.path=C:\Users\David\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -verbose C:\Program Files (x86)\Arduino\examples\01.Basics\Blink\Blink.ino
Using board 'uno' from platform in folder: C:\Users\David\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19
Using core 'arduino' from platform in folder: C:\Users\David\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19
Detecting libraries used...
"C:\Users\David\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Users\David\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\David\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\variants\standard" "C:\Users\David\AppData\Local\Temp\arduino_build_759758\sketch\Blink.ino.cpp" -o "nul"
Generating function prototypes...
"C:\Users\David\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Users\David\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino" "-IC:\Users\David\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\variants\standard" "C:\Users\David\AppData\Local\Temp\arduino_build_759758\sketch\Blink.ino.cpp" -o "C:\Users\David\AppData\Local\Temp\arduino_build_759758\preproc\ctags_target_for_gcc_minus_e.cpp"

avr-g++: error: cannot access device-specs for 'atmega328p' expected at 'device-specs/specs-atmega328p'

avr-g++: note: devices natively supported: ata5272 ata5505 ata5702m322 ata5782 ata5790 ata5790n ata5791 ata5795 ata5831 ata6285 ata6286 ata6289 ata6612c ata6613c ata6614q ata6616c ata6617c ata664251 ata8210 ata8510 atmega103 atmega128 atmega128a atmega128rfa1 atmega128rfr2 atmega1280 atmega1281 atmega1284 atmega1284p atmega1284rfr2 atmega16 atmega16a atmega16hva atmega16hva2 atmega16hvb atmega16hvbrevb atmega16m1 atmega16u2 atmega16u4 atmega161 atmega162 atmega163 atmega164a atmega164p atmega164pa atmega165 atmega165a atmega165p atmega165pa atmega168 atmega168a atmega168p atmega168pa atmega168pb atmega169 atmega169a atmega169p atmega169pa atmega256rfr2 atmega2560 atmega2561 atmega2564rfr2 atmega32 atmega32a atmega32c1 atmega32hvb atmega32hvbrevb atmega32m1 atmega32u2 atmega32u4 atmega32u6 atmega323 atmega324a atmega324p atmega324pa atmega325 atmega325a atmega325p atmega325pa atmega3250 atmega3250a atmega3250p atmega3250pa atmega328 atmega328p atmega328pb atmega329 atmega329a atmega329p atmega329pa atmega3290 atmega3290a atmega3290p atmega3290pa atmega406 atmega48 atmega48a atmega48p atmega48pa atmega48pb atmega64 atmega64a atmega64c1 atmega64hve atmega64hve2 atmega64m1 atmega64rfr2 atmega640 atmega644 atmega644a atmega644p atmega644pa atmega644rfr2 atmega645 atmega645a atmega645p atmega6450 atmega6450a atmega6450p atmega649 atmega649a atmega649p atmega6490 atmega6490a atmega6490p atmega8 atmega8a atmega8hva atmega8u2 atmega8515 atmega8535 atmega88 atmega88a atmega88p atmega88pa atmega88pb attiny10 attiny11 attiny12 attiny13 attiny13a attiny15 attiny1634 attiny167 attiny20 attiny22 attiny2313 attiny2313a attiny24 attiny24a attiny25 attiny26 attiny261 attiny261a attiny28 attiny4 attiny40 attiny43u attiny4313 attiny44 attiny44a attiny441 attiny45 attiny461 attiny461a attiny48 attiny5 attiny828 attiny84 attiny84a attiny841 attiny85 attiny861 attiny861a attiny87 attiny88 attiny9 atxmega128a1 atxmega128a1u atxmega128a3 atxmega128a3u atxmega128a4u atxmega128b1 atxmega128b3 atxmega128c3 atxmega128d3 atxmega128d4 atxmega16a4 atxmega16a4u atxmega16c4 atxmega16d4 atxmega16e5 atxmega192a3 atxmega192a3u atxmega192c3 atxmega192d3 atxmega256a3 atxmega256a3b atxmega256a3bu atxmega256a3u atxmega256c3 atxmega256d3 atxmega32a4 atxmega32a4u atxmega32c3 atxmega32c4 atxmega32d3 atxmega32d4 atxmega32e5 atxmega384c3 atxmega384d3 atxmega64a1 atxmega64a1u atxmega64a3 atxmega64a3u atxmega64a4u atxmega64b1 atxmega64b3 atxmega64c3 atxmega64d3 atxmega64d4 atxmega8e5 at43usb320 at43usb355 at76c711 at86rf401 at90can128 at90can32 at90can64 at90c8534 at90pwm1 at90pwm161 at90pwm2 at90pwm2b at90pwm216 at90pwm3 at90pwm3b at90pwm316 at90pwm81 at90scr100 at90s1200 at90s2313 at90s2323 at90s2333 at90s2343 at90s4414 at90s4433 at90s4434 at90s8515 at90s8535 at90usb1286 at90usb1287 at90usb162 at90usb646 at90usb647 at90usb82 at94k m3000

avr-g++: note: supported core architectures: avr2 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega2 avrxmega4 avrxmega5 avrxmega6 avrxmega7 avrtiny avr1

avr-g++: note: you can provide your own specs files, see <http://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html> for details

exit status 1
Error compiling for board Arduino/Genuino Uno.

And here is some info from my computer:

OS Name Microsoft Windows 10 Home
Version 10.0.14393 Build 14393
OS Manufacturer Microsoft Corporation
System Manufacturer TOSHIBA
System Model Satellite L50-C
System Type x64-based PC

The fixes I have tried:
Restart Computer
Uninstalling Arduino, Deleting Appdata\Local\Arduino15 folder, Restarting Computer, Reinstalling Arduino
Running it also under Visual Micro
Turning off Firewall from my Antivirus software (McAfee)

Has anyone got any ideas on this one?

Did you download it from the website or via the Windows App store? If the latest, uninstall, delete the AppData and just download the installer form the website.

PS @owndbyu777, there is a major Windows update waiting for you :wink:

I installed it from the website, Second installation - the same error.
I found somehere that this is gcc issue , it expects the uC spec in the first searching folder, so maybe if I copy uC spec into that folder it will work, but the question is : where is that folder?

Just found something:

avr-gcc expected to find the device specs in the search paths specified. But
it doesn't work as expected when device specs in different place than the
installed location.

I think I may have many avrgcc folders ,as I have avr studio also.
SO how to find the initial "the installed location" - it must be configured somewhere....

another thing tha may help to investigate the issu: I wrote the win c== console app to captur command line arguments from avr gcc. See the result below:

argv[0] C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++
argv[1] -c
argv[2] -g
argv[3] -Os
argv[4] -w
argv[5] -std=gnu++11
argv[6] -fpermissive
argv[7] -fno-exceptions
argv[8] -ffunction-sections
argv[9] -fdata-sections
argv[10] -fno-threadsafe-statics
argv[11] -flto
argv[12] -w
argv[13] -x
argv[14] c++
argv[15] -E
argv[16] -CC
argv[17] -mmcu=atmega328p
argv[18] -DF_CPU=16000000L
argv[19] -DARDUINO=10803
argv[20] -DARDUINO_AVR_NANO
argv[21] -DARDUINO_ARCH_AVR
argv[22] -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino
argv[23] -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs
argv[24] C:\Users\X\AppData\Local\Temp\arduino_build_811239\sketch\sketch_jul08a.ino.cpp
argv[25] -o
argv[26] C:\Users\X\AppData\Local\Temp\arduino_build_811239\preproc\ctags_target_for_gcc_minus_e.cpp

gregIrl:
I think I may have many avrgcc folders ,as I have avr studio also.
SO how to find the initial "the installed location" - it must be configured somewhere....

Do this:

  • File > Preferences > Show verbose output during: > Compilation (check) > OK
  • Sketch > Verify/Compile
  • After the compilation examine the contents of the black console window at the bottom of the Arduino IDE window, there you will find the avr-gcc path.

Finally I found the workaround:
in short (it took me good few days of frustration)

inside the ARDUINO folder locate following file:

d:\My\AVR8\Arduino\hardware\arduino\avr\platform.txt

(your location may differ)

add path to the 4.9.2 folder of your Arduino installation:

[....]
compiler.cpp.extra_flags= -v -B d:\My\AVR8\Arduino\hardware\tools\avr\lib\gcc\avr\4.9.2\ 
[....]

then run Arduino as an Administrator (from windows).
I think the issue is related to the (1) Arduino and(2) Windows security.

My advises: No PATH (windows enviromet) to poin to any gcc location

So on my PC I have Arduino 1.8.3, AVR studio 7.0 and old WINAVR2010 with CodeBlocks - and everything work.

let me know if this helps
Greg

I seem to remember there was an issue with "codeblocks" some time ago co-residing with an IDE.

If you can try uninstall that and clean up afterwards just to check.

ballscrewbob:
I seem to remember there was an issue with "codeblocks" some time ago co-residing with an IDE.

If you can try uninstall that and clean up afterwards just to check.

Did you read my post? Everything works now, the issue is fixed, so why do you recommend me to uninstall anything?

And it is very common and annoying when looking for help that most advises are to uninstall and install again.

Regardless...

It was a topic that was relevant !

The thing is that you shouldn't need to hardcode that path. The Arduino IDE should automatically know where avr-gcc is located. So even though it's great you got things working, it's kind of a hack. It would be best to find the true cause of the issue instead of a workaround but if the code is compiling and you're happy that's all that really matters.

Sorry about my late reply to this, I ended up just using my wifes computer to get done what I needed to do, and then got hit with heaps of stuff at work and uni...

gregIrl:
Finally I found the workaround:
in short (it took me good few days of frustration)

Thanks for that Greg it definitely put me in the right direction! It wasn't the exact fix for my case but I think it led me to my fix...

After mucking around a little bit this afternoon I remembered I had to download heaps of stuff for uni and one of the things was a compiler called cygwin... I was looking around in the error messages I was getting when trying out your fixes and saw that name in there so I ended up uninstalling the stuff I had installed for uni this semester, deleted the extra stuff I added in Environment Variables, uninstalled Arduino, deleted my local install folder in Program Files, deleted my AppData/Local/Arduino15 folder, updated Arduino to 1.8.4, and it all works!

Not 100% sure the exact fix, but something in that did it! I can now compile and run programs on my Arduino from my computer!

Thanks for all your help,
Dave

@owndbyu777

In your case the fix was deleting the arduino15 directory

owndbyu777:
Sorry about my late reply to this, I ended up just using my wifes computer to get done what I needed to do, and then got hit with heaps of stuff at work and uni...

Thanks for that Greg it definitely put me in the right direction! It wasn't the exact fix for my case but I think it led me to my fix...

Not 100% sure the exact fix, but something in that did it! I can now compile and run programs on my Arduino from my computer!

Thanks for all your help,
Dave

Good to hear yours IDE is working now.
Now, I am nearly sure the most important things to fix that issue was to run Arduino in admin mode (equivalent to some security windows settings to be alerted).
Hopefully they fix this in 1.8.4 so no need for workaround.