Welcome! Log In Create A New Profile

Advanced

Verification failure after upload?

Posted by jamesshuang 
Verification failure after upload?
July 07, 2013 02:05AM
Hey everyone, I built up a Sanguinololu completely from scratch. It seems that almost everything is working. I can compile a small test program and upload it with avrdude. Everything works correctly until the last step:

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0x0c != 0xff
avrdude: verification error; content mismatch

If I download the full flash contents using avrdude, everything returns as 0xFF. Based on the verbose logs, it looks like the FTDI chip is talking correctly with the ATmega1284p. All the handshake messages seem to work fine. The sent data all looks good. It seems that only issue is the flash fails to be written. Is my chip dead? Could there be any other possibilities?
Re: Verification failure after upload?
July 07, 2013 02:32AM
The error means that you have the wrong bootloader. The firmware is not actually uploading (hence the error).

You need to burn the correct bootloader onto the atmega using the ISP port.
Re: Verification failure after upload?
July 07, 2013 07:30AM
Well, do you have a bootloader at all? Factory fresh ATmegas don't. You'd need a programming device to upload one.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Verification failure after upload?
July 07, 2013 12:07PM
Ok, I did mess with the bootloader earlier. It seems pretty likely that I messed it up. I'll have to try burning it again.
Re: Verification failure after upload?
July 07, 2013 10:51PM
So I had a usb245r chip lying around, and I tried to flash the bootloader with the "ft245r" programmer. Unlocking the chip with the following command seems to work:

avrdude -patmega1284p -cft245r -Pft0 -b57600 -U lock:w:0x3F:m

It tells me that it even passed validation. With the sanguino bootloader as found in [code.google.com] , I flashed with the following command:

avrdude -pATmega1284p -cft245r -Pft0 -b 4800 -u -U flash:w:bootloader-1284P-16MHz.hex -v


It gave me a validation error:

avrdude: verification error, first mismatch at byte 0x1f000
         0xff != 0x0c
avrdude: verification error; content mismatch


With the Gen7 bootloader, I get the same error, but at a different memory location:

avrdude: verification error, first mismatch at byte 0x1f800
         0xff != 0x8f
avrdude: verification error; content mismatch


I tried at a variety of baudrates, 4800, 9600, 57600, 115200. None made any difference. Am I correct in assuming that this chip is toast?
Re: Verification failure after upload?
July 08, 2013 04:35AM
Quote

Am I correct in assuming that this chip is toast?

No. As long as you get any results at all, the chip runs. Also, ATmegas are pretty hard to destroy, even attaching 12V to an I/O pin destroys only that pin.


avrdude: verification error, first mismatch at byte 0x1f800

0x1f800 = 126k = 128k - 2k, right? That's the first byte of the bootlader its self, so a failure to write this byte is expected. The Sanguino bootloader is 4k in size, so only 124k are available for the firmware.

You firmware is simply too big for this chip.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Verification failure after upload?
July 08, 2013 10:45AM
Wait, that was an attempt to load the bootloader, not a firmware. So it seems to be failing validation of the first bit of the bootloader? Am I doing something wrong for loading a bootloader somehow?
Re: Verification failure after upload?
July 08, 2013 04:58PM
Well, it seems that my usb245r chip is broken. I found a computer with a parallel port, reflashed the bootloader (which worked fine), and tried flashing a firmware (which also worked fine). Before, I was getting the dreaded stk500_recv() programmer not responding error, but now I have a brand new Sprinter firmware connected to pronterface. All is well...

For reference in case anyone stumbles onto this thread: parallel ports are your friend. If you get the stk500_recv error, try burning a gen7 bootloader.
  1. Install Arduino 1.0.4 from [arduino.cc]
  2. Download the file from here: [github.com],
  3. extract it to your arduino/hardware directory
  4. Burn bootloader from the arduino tools menu

Firmwares should upload fine after this.

Edited 1 time(s). Last edit at 07/08/2013 06:33PM by jamesshuang.
Re: Verification failure after upload?
July 09, 2013 12:56AM
Some ISP programmers can't handle 128k chips like the atmega1284p.
Re: Verification failure after upload?
July 09, 2013 07:44AM
Glad you got it working!


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Verification failure after upload?
July 07, 2015 03:52AM
Hi.
I am having a similar problem.

I tried uploading the Boot-loader for Gen7 @ 16Mhz.

I got the following error,

avrdude: verification error, first mist match at byte 0x1f800
0x8f != 0xff


I am using Atmega1284p as the MCU and Usbtiny programmer.

i have attached a picture regarding the same.

What is the problem, cause, and solution?

Thank you.

Yashu
Attachments:
open | download - bootloader_error_pic.png (24.3 KB)
Re: Verification failure after upload?
July 07, 2015 05:56AM
USBtiny isn't capable to program Flash above 64k: [reprap.org]

Either get a better programmer or go without bootloader. Uploading a firmware of up to 64k with the programmer directly should work.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Verification failure after upload?
July 07, 2015 06:31AM
Okay.

I want to clear a few things here. First, I am trying to upload the firmware. Which is a 4kb HEX file. So, according to me it should not be a problem uploading the bootloader as it is less that 64 kb.
I am aware that Usbtiny cannot upload above 64kb but then again, my device is programming the boot loader into the flash of the 1284 but there is a verification error.
I checked the size of the bootloader using "Avr-size". It comes out to be 1220 bytes.
So, i dont think that uploading the bootloader via USBtiny should be a problem.


Also, i would like to know the cause of the "Verification error"

Thanks.
Yashu
Re: Verification failure after upload?
July 07, 2015 06:15PM
you didnt read the link

Ill re phrase, you cant use a USBtiny to upload a boot loader, as the boot loader sits at the end of eeprom.

This issue is that the USB tiny only attempts to control 16 bit address not the full 24 bit address, so the chip nevers gets full addreses from your programmer. As far as the atmeg 1284 is concerned, your sending it garbage

You have no choice but to use a different programmer.

Edited 2 time(s). Last edit at 07/07/2015 07:24PM by Dust.
Re: Verification failure after upload?
July 08, 2015 01:29AM
Okay. Now i understood the meaning of "Cannot program flash above 64kb". Thanks 'DUST' and 'Traumflug '.

Quote
Traumflug
Uploading a firmware of up to 64k with the programmer directly should work.

Ill try to upload Marlin firmware directly.

Thanks a lot guys.

Yashu.
Sorry, only registered users may post in this forum.

Click here to login