My arduino is not uploading any sketches

I tried running lufa library on my arduino and then removed it as it doesnt work as intended after that my arduino is showing two com ports and not detecting arduino evry time i upload a sketch i doesnt work now did it burn my board? or there is any hope to reset it? to make it go back to its original state also i have tried avrdudes to upload a .hex when arduinis in bootloader state it also didnt work.


I moved your topic to an appropriate forum category @ahmo934.

In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

Hi @ahmo934. Please try this recovery technique:

  1. Select File > Examples > 01.Basics > BareMinimum from the Arduino IDE menus.
    The basic "BareMinimum" sketch will open in a new IDE window.
  2. Select Sketch > Upload from the Arduino IDE menus.
  3. Watch the black console window at the bottom of the Arduino IDE window until you see something like this:
    Sketch uses 444 bytes (1%) 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.
    
  4. Immediately press and release the reset button on the Arduino board.

Hopefully the sketch will upload successfully this time.

After this, you should be able to go back to uploading normally, without needing to press the reset button. If you find the problem comes back again later, it is likely caused by something in the sketch code. The tricky thing about the boards with native USB capability like your board is the USB code that creates the CDC serial port is running on the same microcontroller as your sketch. This means your sketch code can break the system used to activate the bootloader on the board during an upload, or break/disable the USB code entirely making the board no longer produce a port. It is inevitable that you will occasionally find the board in this state, either unexpectedly due to a bug in the sketch program or expectedly due to an intentional behavior of the program (e.g., putting the microcontroller to sleep). Now that you know the recovery technique, such an eventuality won't halt progress on your project.

Now im getting this error
Sketch uses 3462 bytes (12%) of program storage space. Maximum is 28672 bytes.
Global variables use 149 bytes (5%) of dynamic memory, leaving 2411 bytes for local variables. Maximum is 2560 bytes.
PORTS {COM1, COM3, } / {COM1, COM3, } => {}
PORTS {COM1, COM3, } / {COM1, } => {}
PORTS {COM1, } / {COM1, } => {}
PORTS {COM1, } / {COM1, } => {}
PORTS {COM1, } / {COM1, COM3, } => {COM3, }
Found upload port: COM3
C:\Users\Ahmad\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\Ahmad\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega32u4 -cavr109 -PCOM3 -b57600 -D -Uflash:w:C:\Users\Ahmad\AppData\Local\Temp\arduino_build_490200/BareMinimum.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\Ahmad\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

An error occurred while uploading the sketch
avrdude: can't open config file "C:\Users\Ahmad\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\Ahmad\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

It seems your installation of the AVRDUDE tool used to upload sketches to the board has somehow been corrupted.

It should be possible to easily fix this by using the Arduino IDE Boards Manager to downgrade and then upgrade the "Arduino AVR Boards" platform. This will force Arduino IDE to install a fresh copy of AVRDUDE, replacing the broken copy you have currently.

I'll provide instructions you can follow to do that:

  1. Select Tools > Board > Boards Manager... from the Arduino IDE menus.
    The "Boards Manager" dialog will open.
  2. Wait for the updates to finish, as shown by the messages printed at the bottom of the "Boards Manager" dialog.
  3. Scroll down through the list of boards platforms until you find the "Arduino AVR boards" entry. Click on it.
    A "Select version" dropdown will appear in the entry.
  4. Click on the "Select version" dropdown.
    It will expand.
  5. Select "1.8.3" from the menu.
  6. Click the "Install" button in the "Arduino AVR boards" entry.
    Boards Manager will now start the process of downgrading the "Arduino AVR boards" platform installation to the older version 1.8.3.
  7. Wait for the installation of version 1.8.3 to finish.
  8. Scroll down through the list of boards platforms until you find the "Arduino AVR boards" entry. Click on it.
    Some buttons will appear on the entry.
  9. Click the "Install" button on the "Arduino AVR boards" entry.
    Boards Manager will now start the process of upgrading the "Arduino AVR boards" platform installation back to the latest version.
  10. Wait for the installation of the latest version to finish.
  11. Click the "Close" button on the "Boards Manager" dialog.
    The "Boards Manager" dialog will close.

Now try uploading to your board again, using the same recovery procedure I described in my previous instructions. Hopefully the error will no longer occur.

1 Like

Thank you so much just tried it and it worked. Again thank you soo much for your help means alot.

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

Regards,
Per

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