user32307: I have a 2560 that I've been working with for a while (over a year for sure), programming it with an avrisp mk2. No issue this whole time, then suddenly, a couple of days ago it starts failing with
avrdude: verification error, first mismatch at byte 0x0002
         0x01 != 0x95
avrdude: verification error; content mismatch

And very obviously not flashing (there's logic that blinks the LED on boot, and the LED isn't blinking anymore). 
The first time this happened, the board appeared completely dead - the programmer wouldn't recognize it, and refused to flash it. After a few days and magic it started recognizing it again, and going through the motions of flashing my firmware, but the verification error persists. The location of the error hasn't changed, nor has the two values (0x01 vs 0x95).
Any ideas what this could be?

user405: TLDR: Make sure that -D flag is not used when calling avrdude to upload your app using the ISP programmer.
After burning the bootloader on a bare ATmega328p chip using the Arduino IDE and an Arduino Uno as ISP, I am running into the same problem that the OP mentioned with this message:
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0094
         0x68 != 0x6a
avrdude: verification error; content mismatch

Right after burning the bootloader, I can upload an application using this avrdude command (yours would vary slightly due to port name, etc.):
avrdude -C/etc/avrdude.conf -v -patmega328p -cstk500v1 -b19200 -P/dev/ttyACM0 -D -Uflash:w:main.hex:i

However, if I change the application code, recompile, and rerun the same avrdude code again, then I get the verification error mentioned by the OP.
In my case, I have confirmed that the -D flag is the problem. In fact, if I remove the -D flag in the avrdude command above, then I can change, compile, and upload my code as many times as I want.
Note that this is different when using the Arduino IDE to program an Arduino Uno directly (using serial communication through the bootloader), where the -D flag is used
avrdude -C/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyACM0 -b115200 -D -Uflash:w:main.hex:i 

since you wouldn't want to erase the bootloader on the Arduino Uno. Somehow using the -D flag is OK in that case.

user32307: Still don't know why, but now have a fix. Re-running the 'Burn bootloader' command from Arduino allowed me to then burn my firmware. Not sure if the issue is with fuses somehow being changed, or what, but this seems to have fixed the issue.
One more fun fact - I tried the same thing on a brand new Mega - same effect. First trying to burn my firmware resulted in a verification error (at a slightly different address), then burned bootloader and re-burned my firmware successfully. Wondering if an update to boards.txt or avrdude came through and changed something.

32307: <p>I have a 2560 that I've been working with for a while (over a year for sure), programming it with an avrisp mk2. No issue this whole time, then suddenly, a couple of days ago it starts failing with</p>

<pre><code>avrdude: verification error, first mismatch at byte 0x0002
         0x01 != 0x95
avrdude: verification error; content mismatch
</code></pre>

<p>And very obviously not flashing (there's logic that blinks the LED on boot, and the LED isn't blinking anymore). </p>

<p>The first time this happened, the board appeared completely dead - the programmer wouldn't recognize it, and refused to flash it. After a few days and <em>magic</em> it started recognizing it again, and going through the motions of flashing my firmware, but the verification error persists. The location of the error hasn't changed, nor has the two values (0x01 vs 0x95).</p>

<p>Any ideas what this could be?</p>
 405: <p><strong>TLDR:</strong> Make sure that <code>-D</code> flag is not used when calling <code>avrdude</code> to upload your app using the ISP programmer.</p>

<p>After burning the bootloader on a bare ATmega328p chip using the Arduino IDE and an Arduino Uno as ISP, I am running into the same problem that the OP mentioned with this message:</p>

<pre><code>avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0094
         0x68 != 0x6a
avrdude: verification error; content mismatch
</code></pre>

<p>Right after burning the bootloader, I can upload an application using this <code>avrdude</code> command (yours would vary slightly due to port name, etc.):</p>

<pre><code>avrdude -C/etc/avrdude.conf -v -patmega328p -cstk500v1 -b19200 -P/dev/ttyACM0 -D -Uflash:w:main.hex:i
</code></pre>

<p>However, if I change the application code, recompile, and rerun the same <code>avrdude</code> code again, then I get the verification error mentioned by the OP.</p>

<p>In my case, I have confirmed that the <code>-D</code> flag is the problem. In fact, if I remove the <code>-D</code> flag in the <code>avrdude</code> command above, then I can change, compile, and upload my code as many times as I want.</p>

<p>Note that this is different when using the Arduino IDE to program an Arduino Uno directly (using serial communication through the bootloader), where the <code>-D</code> flag is used</p>

<pre><code>avrdude -C/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyACM0 -b115200 -D -Uflash:w:main.hex:i 
</code></pre>

<p>since you wouldn't want to erase the bootloader on the Arduino Uno. Somehow using the <code>-D</code> flag is OK in that case.</p>
 32307: <p>Still don't know why, but now have a fix. Re-running the 'Burn bootloader' command from Arduino allowed me to then burn my firmware. Not sure if the issue is with fuses somehow being changed, or what, but this seems to have fixed the issue.</p>

<p>One more fun fact - I tried the same thing on a brand new Mega - same effect. First trying to burn my firmware resulted in a verification error (at a slightly different address), then burned bootloader and re-burned my firmware successfully. Wondering if an update to boards.txt or avrdude came through and changed something.</p>
