AVRDUDE Checksum Fail on MEGA/UNO

Hey all,

I am using Visual Micro inside visual studio to develop. Recently since I switched I noticed that my MEGA 2560 is getting a checksum error on each upload. The uploads appear to work however as the code changes and functions properly. Error:

avrdude: stk500v2_recv(): checksum error
avrdude: verification error, first mismatch at byte 0x36bc
         0xbc != 0x9f
avrdude: verification error; content mismatch

So I tried with one of my uno boards and got the same behavior. The regular Arduino IDE works fine uploading the basic blink sketch on both MUCs.

Any ideas on what is happening?

Thanks, nat

A different version of avrdude or different options. The Arduino IDE uses the normal avrdude to upload the sketch without any other programs.

Peter_n: A different version of avrdude or different options. The Arduino IDE uses the normal avrdude to upload the sketch without any other programs.

Alright, so is this something I should be concerned with? I'm guessing there are blocks of memory that are going bad if I cannot pass a check sum.

Yes, it is a problem. The verification indicates that something is wrong. Often it is bad timing or bad wires or bad breadboard.

Yes, it is a problem. The verification indicates that something is wrong. Often it is bad timing or bad wires or bad breadboard.

You could try to use avrdude in comand line to test if you can read your chip signature.
That test will also prove if your wiring is correct.
Since you dont specify what operation system are you using or what interface I can’t tell you for sure what the command will be but in my case using an external programmer in linux my command is:

avrdude -c usbtiny -p m2560

I completely removed the Arduino from from all of my connections and breadboard. I still get the same error. I always get the error in the 0x3### addresses. Small programs like the blink sketch don't fail but as the sketch size grows the error shows up. I am running the Arduino IDE on its own, just using the standard installations.

Thanks for the help guys!

A bug ? a wrong bootloader ? ram overflow ? There must be some logic to it, but I can't see it. Is there something special about the sketch ?

Could you download the new Arduino IDE 1.6.0, it guesses not only the code size but also the ram size after compiling.

Nope, I loaded one of the SD card library examples to test things. I started with none of the code and slowly uncommented things until I got the error.

Do you have a test sketch that only uses standard libraries ? Perhaps some segment data goes wrong, but I don't understand how that can happen in the Arduino IDE.

P.S.: I was still editing my previous reply, can you try version 1.6.0 ?

Yep, I saw that this morning. I’ll try it out and post back.

Did you have in any part of your code something like "!!!" ?

Nope, what might that do?

In some bootloaders the !!! causes your board to restart because that 3 question marks are used to detect when a new firmware is coming in.When the bootloader detects that !!! it makes the micro to restart to accept the new firmware.My guess has perhaps you might also have that and then during your upload it restarts on the middle of the process and then your error pops up , -> checksum fail. You could read more about what I'm describing here: http://www.desert-home.com/2012/05/arduino-mega2560-wrapping-up-bootloader.html

interesting, good to know to avoid that. I did noticed the LED on pin 13 will flash with the RX light when the checksum fails. it does not when the checksum is ok. the controller does not appear to reset abnormally during upload.