Arduino icon indicating copy to clipboard operation
Arduino copied to clipboard

1.8.8 Arduino IDE Windows Installer drops avrdude.conf in incorrect directory

Open automaticjack1 opened this issue 6 years ago • 10 comments

While attempting to upload a sketch, Blink, the configuration file for avrdude is not found.

automaticjack1 avatar Dec 30 '18 02:12 automaticjack1

Please do this:

  1. Select File > Preferences from the Arduino IDE menus.
  2. Uncheck the box next to "Show verbose output during: compilation" in the "Preferences" dialog.
  3. Check the box next to "Show verbose output during: ☐ upload".
  4. Click the "OK" button.
  5. Attempt an upload, as you did before.
  6. After the upload fails, you'll see a button on the right side of the orange bar in Arduino IDE: "Copy error messages". Click that button.
  7. Paste the error messages in a reply here using code fencing.

per1234 avatar Dec 30 '18 02:12 per1234

The avrdude.conf file is installed here:

C:\Users\USER\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.23\bootloaders\gemma\avrdude.conf

The global configuration expects the avrdude configuration file to be here:

C:\Users\USER\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/etc

This directory does not exist with a clean installation from the Windows installer.

The workaround is to create the directory and copy the existing avrdude.conf to it. This immediately results in the ability to upload sketches to the attached Arduino devices.

It's not clear what the long-term fix is for this.

The system is Windows 10. It is unlikely that other OSes will have the same issue. The zip file version has not been tested or inspected for this issue.

automaticjack1 avatar Dec 30 '18 02:12 automaticjack1

20:10 12/29/2018

Arduino: 1.8.8 (Windows 10), Board: "Arduino Nano, ATmega328P"

Sketch uses 930 bytes (3%) of program storage space. Maximum is 30720 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
C:\Users\jad\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/bin/avrdude -CC:\Users\jad\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/etc/avrdude.conf -v -patmega328p -carduino -PCOM8 -b115200 -D -Uflash:w:C:\Users\jad\AppData\Local\Temp\arduino_build_484494/Blink.ino.hex:i 

avrdude: Version 6.3-20171130
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\jad\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/etc/avrdude.conf"
avrdude: can't open config file "C:\Users\jad\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/etc/avrdude.conf": No such file or directory
avrdude: error reading system wide configuration file "C:\Users\jad\AppDatavrdude: error reading system wide configuration file "C:\Users\jad\AppDat
a\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/etc/avrdude.conf"

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

automaticjack1 avatar Dec 30 '18 02:12 automaticjack1

The global configuration expects the avrdude configuration file to be here:

C:\Users\USER\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/etc

This directory does not exist with a clean installation from the Windows installer.

How much of that directory structure did exist?

The Arduino IDE comes with the full installation of Arduino AVR Boards bundled in the IDE installation folder, including AVRDUDE. In a fresh installation, the location of avrdude.conf that will be used is:

<Arduino IDE installation folder>/hardware/tools/avr/etc/avrdude.conf

(where <Arduino IDE installation folder> is the folder where Arduino IDE is installed on your system)

AVRDUDE is only installed to C:\Users\USER\AppData\Local\Arduino15\packages\arduino\tools\avrdude when you do an update of Arduino AVR Boards via Tools > Board > Boards Manager (or some other 3rd party boards platform that has a dependency on the AVRDUDE tool). It seems like you might have had an incomplete installation of an AVR package installed on your system before you did this installation of the Arduino IDE.

The workaround we recommend on the Arduino forum for this class of problem is to delete the folder at the following path:

C:\Users\<username>\AppData\Local\Arduino15 folder

(where <username> is your Windows username)

In your case, that's probably not necessary since you seem to have found your own, less invasive, solution.

I'll leave it to the Arduino developers to determine whether they want to investigate if the IDE can be improved to avoid this sort of problem in the future, or whether it should be treated as a rare glitch that should just be worked around when it does occur.

per1234 avatar Dec 30 '18 03:12 per1234

AFAICT, the installation using the binary arduino-1.8.8-windows.exe created everything up to but not including the "etc" directory, thus:

C:\Users\USER\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14

I had completely removed the installation directory (C:\Program Files (x86)\Arduino), but not touched the AppData directory.

Also, the MD5 hash of the exe installer file is this, in case anyone sneakily deploys a fix:

c56c9511d9f0a519a9db5d795a99756a *arduino-1.8.8-windows.exe

automaticjack1 avatar Dec 30 '18 08:12 automaticjack1

All files/folders under C:\Users\USER\AppData\Local\Arduino15\packages are only created by Board Manager, not by the exe installer. You probably have a previous installation (via board manager) that didn't end up well and the IDE is trying to use that instead than the bundled one. My suggestion is: start from scratch by removing the whole C:\Users\USER\AppData\Local\Arduino15 folder, retry the upload (it should use the bundled tools) and let us know if it works.

facchinm avatar Jan 02 '19 09:01 facchinm

@automaticjack1 did you ever get a chance to try what facchinm recommended in the last reply? If so, did it solve your issue?

per1234 avatar Mar 26 '19 05:03 per1234

No, I had not. For some reason I never received notification about facchinm's request.

I did work around the issue by copying the necessary configuration file into the place the tool expected it, and have had no issues since.

If there are no other parallel reports of this type, then this issue is probably a one-off or unique occurrence. I haven't had issues with 1.8,8 on either machine I use it on since. The installer also didn't generate any warnings about not being able to create files at the time it was run.

Is there an installer log for the Board Manager I might be able to dig up for you?

automaticjack1 avatar Mar 26 '19 15:03 automaticjack1

For me an easy fix was to simply copy the file avrdude.conf from the installation directory C:\Users\IvanDemec\Downloads\arduino-1.8.16-windows.zip\arduino-1.8.16\hardware\tools\avr\etc to the directory C:\Users\IvanDemec\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17\etc After that it works fine. This happened to me while trying, through board manager, to update AVR boards library.

ivandemec avatar Nov 29 '21 09:11 ivandemec

Sketch uses 3796 bytes (11%) of program storage space. Maximum is 32256 bytes.
Global variables use 190 bytes (9%) of dynamic memory, leaving 1858 bytes for local variables. Maximum is 2048 bytes.
"C:\Users\Prasenna\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\Prasenna\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM16" -b115200 -D "-Uflash:w:C:\Users\Prasenna\AppData\Local\Temp\arduino\sketches\9BA35EB3DE4BB811449C5947C2B55E94/Car_Parking_System (2).ino.hex:i"

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\Prasenna\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
avrdude: can't open config file "C:\Users\Prasenna\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf": No such file or directory
avrdude: error reading system wide configuration file "C:\Users\Prasenna\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Failed uploading: uploading error: exit status 1

can anyone say how to solve this??

PrasennaPS avatar Nov 02 '23 20:11 PrasennaPS