Go Down

Topic: An error occurred while uploading the sketch. (Read 147418 times) previous topic - next topic

pert

Too bad that the only suggested solution is to select the right port. Obviously my problem is very different with my config :

avrdude: usbdev_open(): did not find any USB device "usb" (0x03eb:0x2104)

Maybe a faulty board ?  Strange, since I get the informations from the board through the USB connection.
Your problem is caused by holding the Shift key while you click the Upload button. That causes the Arduino IDE to do an "Upload Using Programmer" instead of a standard Upload. Since you don't have an ISP programmer connected, that won't work, thus the error.

jptrol

Your problem is caused by holding the Shift key while you click the Upload button. That causes the Arduino IDE to do an "Upload Using Programmer" instead of a standard Upload. Since you don't have an ISP programmer connected, that won't work, thus the error.
Thank you for your help Pert. Though I can't remember hitting the shift key or clicking the programmer option , the fact is that when I carefully select upload or CTRL U I now succeed every time I try. May it go on !
Thank you again.

pert

You're welcome. I'm glad to hear it's working now. Enjoy!
Per

SIVAJEEVA

Arduino: 1.8.10 (Windows 7), Board: "Arduino/Genuino Uno"

Sketch uses 936 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
C:\Program Files\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM16 -b115200 -D An error occurred while uploading the sketch-Uflash:w:C:\Users\dharani\AppData\Local\Temp\arduino_build_889315/sketch_oct08a.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:\Program Files\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM16
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200

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

pert

Arduino: 1.8.10 (Windows 7), Board: "Arduino/Genuino Uno"

Sketch uses 936 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
C:\Program Files\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM16 -b115200 -D An error occurred while uploading the sketch-Uflash:w:C:\Users\dharani\AppData\Local\Temp\arduino_build_889315/sketch_oct08a.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:\Program Files\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM16
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200

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

This one is really tricky because the output is not providing us with any useful information about the error. Please try restarting your computer. Maybe by some miracle that will fix the problem, or at least cause the output to show some more info.

huzaima

Arduino: 1.8.4 (Windows 7), Board: "Arduino/Genuino Uno"

GetFileAttributesEx C:\Users\sstsmrsm\Desktop\sketch_oct29c\sketch_oct29c.ino: The system cannot find the file specified.

Error compiling for board Arduino/Genuino Uno.

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

ballscrewbob

@huzaima

Some common causes:-

Over aggressive anti virus or similar
Lack of user permissions.
Actual virus or similar.
Incorrect sketch location or changed during IDE use.

Please rule those out first and use THIS POST as a guide to any extra information you can provide.

Bob.

It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

Tahsin_Raeed

To upload any code , it shows: An error occurred while uploading the sketch ,meanwhile the orange(L) and Green (On) Lights blinks on always.

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

Sketch uses 2040 bytes (6%) of program storage space. Maximum is 32256 bytes.
Global variables use 224 bytes (10%) of dynamic memory, leaving 1824 bytes for local variables. Maximum is 2048 bytes.
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM5 -b115200 -D -Uflash:w:C:\Users\Raeed\AppData\Local\Temp\arduino_build_375716/Blink.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:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM5
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
An error occurred while uploading the sketch

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

Go Up