AVRDUDE error. Arduino IDE won´t upload any sketch

After I installed drivers for a NANO clone (CH340G chip) Arduino IDE stopped uploading sketches, even to the UNO I have used for months. I always get the same message: "avrdude: error at C:\Users\milto\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf:402: syntax error
avrdude: error reading system wide configuration file "C:\Users\milto\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

I've tried:
-Different COM ports
-Unplugging RX/TX pins
-Old bootloader
-Resetting board
-Uninstalling CH340G drivers
-Uninstalling and reinstalling Arduino IDE (2.0.4 and 1.8.19)

I tried also de online IDE version and it works with the old UNO so I'm sure the board and USB cable are ok. I don't know what else should I try. Any ideas?

Hi @miltonch. It appears your installation of the AVRDUDE tool was somehow corrupted. I think it will be solved by uninstalling and then reinstalling the "Arduino AVR Boards" platform.

I'll provide instructions:

  1. Select Tools > Board > Boards Manager from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
  2. Scroll down through the list of boards platforms until you see the "Arduino AVR Boards" entry.
  3. Hover the mouse pointer over the "INSTALLED" label on the "Arduino AVR Boards" entry. You will now see it change to an "UNINSTALL" button.
  4. Click the "UNINSTALL" button.
  5. A confirmation dialog will now appear. Click the "YES" button.
  6. Wait for the uninstallation to finish.
  7. Select the newest version from the dropdown version menu at the bottom of the "Arduino AVR Boards" entry.
  8. Click the "INSTALL" button at the bottom of the "Arduino AVR Boards" entry.
  9. Wait for the installation to finish.

Now try uploading your sketch again. Hopefully the error will no longer occur.

1 Like

Dear Ptillisch

Thanks so much!! It worked fantastically. I spent the whole week trying to fix it up

I owe you a beer my friend!!

Thanks again

Milton

You are welcome. I'm glad it is working now.

Regards,
Per

Hello, in order not to delete and not lose all the data, I rolled back to the next version, it works

No data is lost. The instructions I shared only reinstall the corrupted boards platform.

The only way they could affect any of your own user data is if you manually added or modified files under the C:\Users\<username>\AppData\Local\Arduino15\packages\arduino folder, which is only done rarely by advanced users (you would surely remember if you did it).

I'm glad it is working for you now!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.