Yun Screwed: Avrdude errors - going crazy!

Problem: Yún has developed a flu toward uploading new code.

Error is:

verification error, first mismatch at byte 0x0000
         0xcb != 0xfb
avrdude: verification error; content mismatch

So... background and what I have tried:

This Yun WAS working... I had loaded some linux stuff (Camera stuff) and had the linino side taking pictures and storing them on sd. I went to write the code tr do a curl or and upon downloading the image into ATmega32U4, I could no longer download an image at all...

Tried:

  • reset, restore original fresh Yun Linino image via luci/flash/"reset to defaults"... no effect.
  • used ethernet connection to Yun.
  • used fresh install of IDE 1.5.5 for MacOS (running under 10.8.5) on a virgin MAC, tried just downloading simple "ConsoleRead" example sketch.

Any suggestions???

Full output of avrdude error is here:

Sketch uses 11,816 bytes (41%) of program storage space. Maximum is 28,672 bytes.
Global variables use 481 bytes (18%) of dynamic memory, leaving 2,079 bytes for local variables. Maximum is 2,560 bytes.

avrdude: Version 5.11svn, compiled on Aug  9 2013 at 08:41:40
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/root/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : unknown
         Using Programmer              : linuxgpio
         AVR Part                      : ATmega32U4
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         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    10     8    0 no       1024    8      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : linuxgpio
         Description     : Use the Linux sysfs interface to bitbang GPIO lines

avrdude: Calibrating delay loop... calibrated to 49 cycles per us
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9587
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: Calibrating delay loop... calibrated to 49 cycles per us
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude: reading input file "0xD8"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xD8:
avrdude: load data hfuse data from input file 0xD8:
avrdude: input file 0xD8 contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xFB"
avrdude: writing efuse (1 bytes):

Writing |  ***failed;  
################################################## | 100% 0.06s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xFB:
avrdude: load data efuse data from input file 0xFB:
avrdude: input file 0xFB contains 1 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0xcb != 0xfb
avrdude: verification error; content mismatch
avrdude done.  Thank you.

Any suggestions?... Thanks very much.

-Andrew

BTW... Found I was successful in loading a Blink sketch via ICSP connector and a USBasp... I didn't see whether the bridge was working yet. I selected Programmer/USBasp, ran "Burn Bootloader" first, (Should I have done this?), then downloaded the blink/fade sketch (for LED13). That worked

If the Yun's ATmega32u4 bootloader is bad, can it be re-flashed? (Does it even HAVE a bootloader??) If so... how to try this? Does "burn Bootloader" do just that? Or, did that just initialize my USBasp? If it did reflash something, whuich bootloader would it have placed there? I DID go back and check the Yun to see if it would then accept a sketch download via normal Network->Linino->Bridge->ATmega32u4, but that failed as it has in my original post.

Again, thanks for input!

Maybe this: http://arduino.cc/en/Tutorial/YunUBootReflash

Hi Awardblvr,

I have the same or a very similar problem. In my case the Linino side is fine, so Anjoze’s suggestion would not help.

I too am hoping someone will answer yours, and my, fundamental question:

How do you program a new bootloader for the Arduino side? I’ve looked at a bunch of tutorials, but they do not apply to the Yun.

Where are the Yun Masters? This forum is very quiet for basic questions like ours. I think perhaps we bought the wrong card.

My post: http://forum.arduino.cc/index.php?topic=223157.0

I too am going a little nuts…

Take a look here: http://forum.arduino.cc/index.php?topic=223157.msg1618139#msg1618139