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


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

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

Submitted by:  Simon Sabato <simonls>
Submitted on:  Sat 24 Nov 2012 01:32:55 AM UTC  
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Works For Me Privacy:  Public
Assigned to:  Joerg Wunsch <joerg_wunsch> Originator Name:  simonls
Open/Closed:  Closed Release:  None
Programmer hardware:  Device type: 

Mon 02 Sep 2013 06:19:39 PM UTC, 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 18 Dec 2012 11:06:23 AM UTC, 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 25 Nov 2012 08:08:31 PM UTC, 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 24 Nov 2012 09:27:12 AM UTC, 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 24 Nov 2012 01:32:55 AM UTC, 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 (924KiB - application/gzip - Files related to comment 2 )
file #26966:  upload.txt.gz added by simonls (173KiB - 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
  • -email is unavailable- added by joerg_wunsch (Posted a comment)
  • -email is unavailable- added by simonls (Submitted the item)

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

    Only logged-in users can vote.




    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-09-02 joerg_wunsch Open/ClosedOpen => Closed
    2012-12-18 joerg_wunsch StatusNone => Works For Me
        Assigned toNone => joerg_wunsch
    2012-11-25 simonls Attached File- => Added debug_files.tar.gz, #26970
    2012-11-24 simonls Attached File- => Added upload.txt.gz, #26966

    Back to the top

    Powered by Savane 3.3