Go Down

Topic: Strange problem uploading a sketch after flashing bootloader (Read 415 times) previous topic - next topic

Krupski

Hi all,

I've run into a rather strange problem. If I re-flash the bootloader on my UNO R3 board (using the stock Optiboot that comes with IDE version 1.0.2), then try to upload a sketch, it fails with this message:

[font=monospace]Binary sketch size: 6,268 bytes (of a 32,256 byte maximum)
avrdude: verification error, first mismatch at byte 0x0000
         0x0c != 0xff
avrdude: verification error; content mismatch[/font]


A hex dump of the flash memory shows the difference:

[font=monospace]root@michael:~/Documents# diff fail.hex good.hex
1,4c1,4
< :20000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00
< :20002000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0
< :20004000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0
< :20006000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA0
---
> :200000000C94F2000C941A010C941A010C941A010C941A010C941A010C941A010C941A0131
> :200020000C941A010C941A010C941A010C941A010C941A010C941A010C941A010C941A01E8
> :200040000C9485080C941A010C94C6090C940D0A0C941A010C941A010C941A010C941A01A6
> :200060000C941A010C941A010D0A002020002D2000202020202020202020202B30202B314F[/font]


It seems as though the first 128 bytes are not being programmed.

However, clicking "Upload" again succeeds.

I tried it on three different UNO boards and they all do the same thing.

By the way, if it matters, I reflash the bootloader with an AVRISP MKII programmer.

Also, here are the fuse settings that I use:

[font=monospace]uno.bootloader.low_fuses=0xF7
uno.bootloader.high_fuses=0xDE
uno.bootloader.extended_fuses=0x05
uno.bootloader.unlock_bits=0x3F
uno.bootloader.lock_bits=0x2F[/font]


Anyone have any ideas - I would appreciate it.

-- Roger
Gentlemen may prefer Blondes, but Real Men prefer Redheads!

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy