bugAVR Downloader/UploaDEr - Bugs: bug #41561, AVRDUDE 6.0.1/USBasp doesn't write...


You are not allowed to post comments on this tracker with your current authentification level.

bug #41561: AVRDUDE 6.0.1/USBasp doesn't write first bytes of flash page

Submitted by:  Michal Salaban <emes>
Submitted on:  Wed 12 Feb 2014 02:29:09 AM UTC  
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: NonePrivacy: Public
Assigned to: NoneOriginator Name: Michal Salaban
Open/Closed: Open

Wed 12 Feb 2014 09:09:39 AM UTC, comment #5:

Downgraded to 5.11svn-20111019. It fails even more, signalling first verify mismatch at address 0x0000.

Re-reading the flash takes normal amount of time but results in a strange, single-byte (0xff) hex dump.

Downgraded to full 5.11 — worked like a charm!

Perhaps we should change the title, as it seems unrelated to windows/linux difference :)

Michal Salaban <emes>
Wed 12 Feb 2014 08:47:52 AM UTC, comment #4:

Here's the full log from linux box.

On windows I installed libusb, but I cannot guarantee that avrdude uses it. I flash the device using gui wrapper named companion9x:

Important thing here: that software contains avrdude 5.11-Patch #7610. This is something I've just realized. Will try to downgrade my linux version.

Another interesting thing is that when I select fast mode on the programmer, the linux version randomly fails to write flash with "target doesn't answer" or "invalid signature" (0x000102 instead of 0x1e9602). The original bug, however, occurs both in fast and slow mode.

(file #30523)

Michal Salaban <emes>
Wed 12 Feb 2014 05:59:21 AM UTC, comment #3:

Can you attach a -vvvv log?

Do you know whether the windows version uses the libusb driver, or
the HID one?

Joerg Wunsch <joerg_wunsch>
Project Administrator
Wed 12 Feb 2014 02:40:17 AM UTC, comment #2:

Thanks for posting this bug. I have been researching this issue but did not know it was linux only. My information including hex files and a diff of the write error is located at


If I can help to resolve this possible bug let me know I can help

Randy Perkins <rperkins>
Wed 12 Feb 2014 02:31:16 AM UTC, comment #1:

BTW the programmer has already flashed a handful of atmega8 and attiny85 while connected to one of these affected PCs. No problems ever.

Michal Salaban <emes>
Wed 12 Feb 2014 02:29:09 AM UTC, original submission:

I'm flashing a RC model transmitter, which is based on atmega64a chip. The programmer is usbasp connected through ISP.

Flash reading works well.
Writing, however, results in a strange error. First of all, the message is:

Reading | ################################################## | 100% 371.64s

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

avrdude: safemode: Fuses OK (H:FF, E:89, L:0E)

avrdude done. Thank you.

This is 100% reproducible, no matter if I select slow or fast programming mode by usbasp jumper or I power the device via the programmer or externally.

It has been also checked on two different machines, i86-32 and i86-64. Same results.

The re-read flash exhibits strange pattern. Starting from offset 0x100, every 0x100 bytes on there is a row of bytes with value 0xff. Usually there are eight of them, sometimes seven.

My guess is that at the beginning of each flash page (which is 0x100 bytes long AFAIK) the initial data goes missing.

The same device with the same programmer, connected to windows on i86-32, gets flashed and verified with zero problems.

The linux boxes keep quiet about any errors. Nothing in dmesg there. Both use Arch distro, 3.11.6 kernel.

Michal Salaban <emes>


Attached Files
file #30523:  bug.tar.gz added by emes (284kB - application/gzip - Full bug reproduction with -vvvv logs)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by joerg_wunsch (Posted a comment)
  • -unavailable- added by rperkins (Posted a comment)
  • -unavailable- added by emes (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 12 Feb 2014 09:27:37 AM UTCjoerg_wunschSummaryLinux version of avrdude doesn\'t write first bytes of flash page, while windows version does=>AVRDUDE 6.0.1/USBasp doesn't write first bytes of flash page
    Wed 12 Feb 2014 08:47:52 AM UTCemesAttached File-=>Added bug.tar.gz, #30523

    Back to the top

    Powered by Savane 3.1-cleanup