avrdude error while uploading

Th

cathytsir:
I found this tutorial ..I haven't tried it out yet but maybe it can help...

Reflashing Arduino Uno's Bootloader | Xuan Wu

That procedure requires another Uno. If you have access to another Uno, then try that Uno first with your Arduino IDE and the blink sketch to see if that works.

I suppose I'd start by (re)installing the Arduino IDE maybe on another PC and try to get the basic blink sketch working.

I'd also consider removing all the connections to the UNO which have been made for the project to absolutely eliminate anything resulting from a wiring error. Or use another Uno if you have one.

It could also be that Windows 10 has just received an update which suddenly renders it incompatible with Arduinon's use of the USB as has been suggested earlier.

Well I tried another pc which had an older version of Arduino IDE (1.6.4) and Windows 7..again a huge error even in the blank code..
So I wired everything in my other Arduino and it worked...I guess i destroyed my old Arduino :((((( I assume that the problem begun when I tried to upload a code which took up too much memory and I got a warning like " Low memory-may cause stability problems" ...after this I uploaded normally another code with less sensors and stuff and it was uploaded..and then suddenly the problem started..but maybe I overloaded the UNO with sensors ..i had hooked up : a Bluetooth module, a Myoware muscle sensor, a DHT11 temperature sensor , a piezo vibration sensor, an accelerometer, an SD card module and i tried to add the real Time clock as well and that's when I got the warning..maybe it couldn't work with all these so it corrupted :frowning:

You've now got the situation where one Uno works and another Uno does not work ?

You've already been told that anything on the hardware serial port (pins 0 and 1) may disturb the sketch upload process and should be temporarily disconnected. A wiring error which causes electrical instability (things getting hot etc.) could also influence the upload process.

Uploading a sketch is unlikely to cause corruption of the boot loader if you are using only the USB connection to load it.

If you really do need to re-install the bootloader, there are simpler methods than the tutorial you linked to. For example, here: https://www.arduino.cc/en/Tutorial/ArduinoISP

I disconnected everything from the Arduino to be sure that the wiring isn't causing the problem and still the same error pops up.. Yes now I have only one Arduino working I coulnd't manage to fix the problem in my older Arduino so I used another one and it has no problem.. I just mentioned this warning I got before the problem with my old Arduino begun...maybe it is what caused the problem..

The "Low memory-may cause stability problems" warning is definitely not related. I've never found a solid cause for this verification error problem. The big picture is that the sketch is uploaded to the Arduino board and then after it is read back from the board and what is read is compared to what was written. If they don't match then you get the "verification error" message. So there are two possibilities:

  • The data was corrupted on its way to or from the microcontroller. Maybe a bad connection or interference on the line (such as could be caused by something connected to pins 0 and 1).
  • The data was not correctly stored in the flash memory of the microcontroller. Maybe the flash memory is faulty or there is a problem with the bootloader.

So the only solution is to re-intsall the Bootloader using the above mentioned tutorial??

A possible solution. I actually think the corrupted bootloader is the least likely cause. It's definitely not guaranteed to solve it but you can give it a try if you like. You already have an extra Arduino board to use as an "Arduino as ISP". Other than that, you only really need some jumper wires to connect the two boards together.

Before reburning the bootloader...

  • Try a different USB cable.

  • Perform a loopback test.

Sorry that I am asking this but what exactly is a loopback test??

No need to apologize. None of us are born knowing that.

http://forum.arduino.cc/index.php?topic=73748.0

Thank you I'll certainly try it!!

Hello! So i performed the loopback test..as you said when I wrote something in the Serial port and pressed enter it appeared right away in the port..does that mean that the communication from the pc to the board through USB cable is ok?
When i tried to upload something to the board again the same problem..now it is stuck with the last code that had been uploaded before the error!
I guess now i have to try burning the bootloader..should i follow the official instructions from arduino site? if i perform it is there any chance i also destroy my second Arduino?

cathytsir:
does that mean that the communication from the pc to the board through USB cable is ok?

Yes.

I guess now i have to try burning the bootloader.

Reburning the bootloader is the next step.

should i follow the official instructions from arduino site?

Which official instructions (post a link)?

if i perform it is there any chance i also destroy my second Arduino?

Anything is possible. But, I have used a "second Arduino" many times to burn bootloaders / burn Flash and my "second Arduino" still works perfectly. Adding some 1 k to 220 ohm resistors to the SPI connections should eliminate any possibility of damaging either Arduino.

I mean these instructions: https://www.arduino.cc/en/Tutorial/ArduinoISP

Also I checked the show verbose output during compilation & upload and it showed me this (part of it, it was a too huge message):

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

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Users\kat_t\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf"

Using Port : COM4
Using Programmer : arduino
Overriding Baud Rate : 115200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 4.4
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\kat_t\AppData\Local\Temp\arduino_build_834827/sketch_may18b.ino.hex"
avrdude: writing flash (444 bytes):

Writing | ################################################## | 100% 0.06s

avrdude: 444 bytes of flash written
avrdude: verifying flash memory against C:\Users\kat_t\AppData\Local\Temp\arduino_build_834827/sketch_may18b.ino.hex:
avrdude: load data flash data from input file C:\Users\kat_t\AppData\Local\Temp\arduino_build_834827/sketch_may18b.ino.hex:
avrdude: input file C:\Users\kat_t\AppData\Local\Temp\arduino_build_834827/sketch_may18b.ino.hex contains 444 bytes
avrdude: reading on-chip flash data:

An error occurred while uploading the sketch
Reading | ################################################## | 100% 0.06s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0002
0x6b != 0x34
avrdude: verification error; content mismatch

avrdude done. Thank you.

cathytsir:
I mean these instructions: https://www.arduino.cc/en/Tutorial/ArduinoISP

Yes, follow those instructions.

With an option... Putting series resistors on the MOSI, MISO, and SCK connections will protect both sides. Anything between 220 ohms to 1000 ohms is a good choice.

ok maybe a stupid question but when you say series resistors you mean connecting the resistor with the pin and then the cable through the breadboard right?
Thanks!

I believe the answer is "yes". But, just to be certain...

MISO on Arduino #1 ---> 220 ohms ---> MISO on Arduino #2

MOSI on Arduino #1 ---> 220 ohms ---> MOSI on Arduinio #2

SCK on Arduino #1 ---> 220 ohms ---> SCK on Arduinio #2

Only include a series resistor on those three pins.

I tried to do the process of burning the bootloader using Arduino UNO as programmer.. turns out it;s more difficult than i expected.. I got the following error

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

avrdude: Expected signature for ATmega328P is 1E 95 0F
Double check chip, or use -F to override this check.
Error while burning bootloader.

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