bugAVR Downloader/UploaDEr - Bugs: bug #37801, AVRDUDE incorrectly programs...


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

bug #37801: AVRDUDE incorrectly programs sparse images >64KB

Submitted by:  Simon Sabato <simonls>
Submitted on:  Sat Nov 24 01:32:55 2012  
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: Works For MePrivacy: Public
Assigned to: Joerg Wunsch <joerg_wunsch>Originator Name: simonls
Open/Closed: ClosedRelease: None
Programmer hardware: Device type: 

Mon Sep 2 18:19:39 2013, comment #4:

Everything works for me, and no further comments from the
submitter for 9 months.

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Tue Dec 18 11:06:23 2012, comment #3:

Thanks for supplying the files.

I tried all combinations of the following:

. version 5.11.1 (latest release), with your hex file
. SVN version (r1125), with your hex file
. SVN version (r1125), with your ELF file (SVN version can
program ELF files directly, including sparse files)


. STK600
. STK500 (using V2 firmware)

All work as intended, i. e. the sparse files are being programmed
correctly. Consequently, the bug must be in the Arduino programmer/
bootloader, somehow. Presumably, it confuses the way the "load
address" command is implemented, in particular the use of bit 31 as an
indication to use extended (24-bit) addressing.

However, the log file you submitted does not match the ELF/hex files
you uploaded later. The load address commands in your log are:

[06] . [80] . [00] . [00] . [00]
[06] . [80] . [00] . [80] . [00]
[06] . [80] . [00] . [f6] . [80]

If I flash your hex file, I get:

[06] . [80] . [00] . [00] . [00]
[06] . [80] . [00] . [80] . [00]
[06] . [80] . [01] . [00] . [00]
[06] . [80] . [01] H [48] . [00]

Note that the addresses in the "load address" command are 16-bit word
addresses (when operating on flash), so the respective byte address
blocks are 0, 0x10000, 0x1ed00 for your log file, and 0, 0x10000,
0x20000, 0x29000 for your hex file.

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Sun Nov 25 20:08:31 2012, comment #2:

Files Attached (within debug_files.tar.gz):

SabatoKeypad.cpp.elf : ELF file of my application
SabatoKeypad.cpp.hex : Intel HEX generated from the ELF
SabatoKeypad.cpp.bin : RAW binary generated from the ELF
short_log.txt : Log (3 "-v"s) of write/verify (HEX vs BIN)
long_log.txt : Log (5 "-v"s) of write/verify (HEX vs BIN)
failed.bin : Binary dump of flash after failure

The "failed.bin" was created by first filling bottom 240KB of Flash w
ith 0x55, then programming from Intel HEX, then reading back the Flash.
Maybe it will help isolate WHERE the bad data was written. (You can
also see the bootloader in there, in case there is some relevant bug
that was fixed after Sept 2010).

Let me know if there's anything else I can do to help.

(file #26970)

Simon Sabato <simonls>
Sat Nov 24 09:27:12 2012, comment #1:

Would you be willing to also supply the hex file in question?

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Sat Nov 24 01:32:55 2012, original submission:

Avrdude 5.11, as included in Arduino 1.0.1. Using stk500v2 protocol and Arduino bootloader-based programming.

I thought I'd submitted this already, but maybe it never went through.

I had a project which partially utilizes bottom 64KB, then packs some binary data beginning at 128KB & 192KB. The Flash was incorrectly programmed starting at 0x10000. I tried both Intel and Motorola formats, same thing. I then generated a 256KB binary file, and that one programmed correctly. Hence I suspect it's an issue jumping the programming forward over a 64KB boundary.

Have attached a verbose log of the programming which failed.

Simon Sabato <simonls>


Attached Files
file #26970:  debug_files.tar.gz added by simonls (924kB - application/gzip - Files related to comment 2 )
file #26966:  upload.txt.gz added by simonls (173kB - application/gzip - Verbose log of the programming which failed)


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 simonls (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Sep 2 18:19:39 2013joerg_wunschOpen/ClosedOpen=>Closed
    Tue Dec 18 11:06:23 2012joerg_wunschStatusNone=>Works For Me
      Assigned toNone=>joerg_wunsch
    Sun Nov 25 20:08:31 2012simonlsAttached File-=>Added debug_files.tar.gz, #26970
    Sat Nov 24 01:32:55 2012simonlsAttached File-=>Added upload.txt.gz, #26966

    Back to the top

    Powered by Savane 3.1-cleanup