0

OS: Windows 11

Arduino IDE Version: 2.3.2

I recently opened up my Arduino IDE to find that nothing--absolutely nothing--would compile. Whenever I tried, I got the following error message:

Using board 'uno' from platform in folder: C:\Users\abrah\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\abrah\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...
C:\Users\abrah\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\abrah\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\abrah\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\abrah\AppData\Local\Temp\arduino\sketches\5ECA4E3B637A45D6CBCAE2784E028875\sketch\sketch_aug10a.ino.cpp -o nul
Error while detecting libraries included by C:\Users\abrah\AppData\Local\Temp\arduino\sketches\5ECA4E3B637A45D6CBCAE2784E028875\sketch\sketch_aug10a.ino.cpp
Generating function prototypes...
C:\Users\abrah\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\abrah\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\abrah\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\abrah\AppData\Local\Temp\arduino\sketches\5ECA4E3B637A45D6CBCAE2784E028875\sketch\sketch_aug10a.ino.cpp -o C:\Users\abrah\AppData\Local\Temp\1032671058\sketch_merged.cpp
avr-g++: error: device-specs/specs-atmega328p: No such file or directory
exit status 1

Compilation error: exit status 1

I have uninstalled and reinstalled the IDE from the website multiple times, I have attempted to compile multiple pre-coded examples on both a Uno board and a Nano board, and I have attempted to trace the file reported as missing. (It does not exist). I have also compiled and uploaded my code using the Arduino Cloud Editor, and that worked fine. However, the Cloud Editor is still a prototype and leaves a few things to be desired, so I would like to return to using the regular IDE as soon as possible.

6
  • try compiling an empty sketch
    – jsotola
    Commented Aug 12 at 1:31
  • The specific error message is "device-specs/specs-atmega328p: No such file or directory", so please check your installation directory for this. What did you do with your PC (install other software, organizing your home directory, general clean up, ...) since the last time it worked? It does not need to be some action with the Arduino IDE. Commented Aug 12 at 6:10
  • @jsotola it gives the same error @ the busybee my computer account was recently (accidentally) wiped. Since that event, I have re-installed the Arduino IDE, because the former auto-recovered version was not working. Commented Aug 13 at 3:22
  • 1
    Removing arduino ide and reinstall only updates that IDE, but all the boards, compilers and arduino cores are stored in C:\Users\abrah\AppData\Local\Arduino15 .. If you have issue, rename it into for example Arduino15_backup and start IDE (and install all the boards you need again).
    – KIIV
    Commented Aug 13 at 18:26
  • 1
    YES! It worked! Thank you so much! @KIIV if you want to submit that comment as a full answer I'd be more than happy to accept and upvote it. Commented Aug 16 at 18:56

2 Answers 2

1

Error messages indicates there is an device spec missing somewhere in compiler directory structure. As all installed boards from Board Manager are stored outside Arduino IDE installation directories (C:\Users\abrah\AppData\Local\Arduino15) so it's not affected by reinstallations of IDE. You can even run different IDE's and all are using this directory.

You can either delete this directory (or rename) and download all the boards you are using again and they should be completely fresh.

I forgot to mention you could try to uninstall Arduino AVR boards in Boards Manager and reinstall it again or switch to the previous version and then back to to latest

1
  • OP writes in a comment "my computer account was recently (accidentally) wiped". Arduino15 folder is in users home folder so I guess OP only needed to install the packages
    – Juraj
    Commented Aug 17 at 11:31
0

I have seen that happen when you don't select a target (a board to compile to) or don't change the target when trying to compile code for the next one

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.