Go Down

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

jcmschott

Hello, guys!

I got the same problem and the only thing that worked to me as to open the IDE as root.

brandon1177

Hello,

I'm new to programming Arduino, is there anyone that can help me get started because I've been having this error.

Arduino: 1.8.12 (Windows 10), Board: "Arduino Nano Every, ATMEGA328"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware

Sketch uses 1120 bytes (2%) of program storage space. Maximum is 49152 bytes.
Global variables use 22 bytes (0%) of dynamic memory, leaving 6122 bytes for local variables. Maximum is 6144 bytes.
An error occurred while uploading the sketch


Thanks in advance!!

pert

An error occurred while uploading the sketch
I'll ask you to provide the verbose output in hopes that will provide us with more information we can use to identify the cause of the error.

Please do this:
  • (In the Arduino IDE) File > Preferences
  • Uncheck the checkbox next to "Show verbose output during: compilation"
  • Check the checkbox next to "Show verbose output during: upload
  • Click "OK"
  • Sketch > Upload
  • After the upload fails, you'll see a button on the right side of the orange bar "Copy error messages" (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button.
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the upload output between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

marlok97

Hello, somebody could me help
Arduino: 1.8.10 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Sketch uses 2040 bytes (0%) of program storage space. Maximum is 253952 bytes.
Global variables use 234 bytes (2%) of dynamic memory, leaving 7958 bytes for local variables. Maximum is 8192 bytes.
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
An error occurred while uploading the sketch

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

pert

Code: [Select]
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
Remove any connections to pins 0 and 1 on your Arduino board. These pins are used for communication with your computer, including uploads. Connecting anything to these pins can interfere with uploads.

Make sure you have the correct board selected from the Tools > Board menu.

Make sure you have selected the port of your Arduino board from the Tools > Port menu.

Sometimes the port will be labeled with the board name in the menu. Other times it will not. If you don't know which port is your Arduino board, you can find it like this:
  • Unplug your Arduino board from the computer.
  • Tools > Port
  • Note the ports, if any, listed in the menu.
  • Close the Tools menu. The ports list is only updated when the Tools menu is re-opened, so this step is essential.
  • Plug your Arduino board into the computer.
  • Tools > Port - The new port listed in the menu is your Arduino board.

ballscrewbob

@marlok97

Per has shown you how to post error and code using code tags ( </> )
Please use his wisdom to help yourself.

Could you also take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.
Other general help and troubleshooting advice can be found here.

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

unholymealman

Arduino: 1.9.0-beta (Windows 10), Board: "Arduino Uno"

Sketch uses 2256 bytes (6%) of program storage space. Maximum is 32256 bytes.
Global variables use 216 bytes (10%) of dynamic memory, leaving 1832 bytes for local variables. Maximum is 2048 bytes.
C:\Users\unhol\Downloads\arduino-1.9.0-beta-windows\arduino-PR-beta1.9-BUILD-119\hardware\tools\avr/bin/avrdude -CC:\Users\unhol\Downloads\arduino-1.9.0-beta-windows\arduino-PR-beta1.9-BUILD-119\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM4 -b115200 -D -Uflash:w:C:\Users\unhol\AppData\Local\Temp\arduino_build_473414/Timer_Project_two.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\unhol\Downloads\arduino-1.9.0-beta-windows\arduino-PR-beta1.9-BUILD-119\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM4
         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.
 
thats what this says, I have no idea what to do

pert

Overriding Baud Rate          : 115200
An error occurred while uploading the sketch
Does it show that same output every time you try to upload, or is there sometimes more output? The reason I ask is because usually there is a descriptive error message that gives us a better idea of what went wrong.

Go Up