bugAVR Downloader/UploaDEr - Bugs: bug #29264, avrdude upload to xmega using...


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

bug #29264: avrdude upload to xmega using stk500 protocol using byte addresses rather than word addresses

Submitted by:  giuliano carlini <gorillacoder>
Submitted on:  Fri Mar 19 06:26:58 2010  
Category: NoneSeverity: 3 - Normal
Priority: 1 - LaterItem Group: None
Status: NonePrivacy: Public
Assigned to: NoneOriginator Name: giuliano carlini
Open/Closed: OpenRelease: None
Programmer hardware: Device type: 

Sun Mar 10 20:12:45 2013, comment #5:

When the opcodes AVR_OP_LOADPAGE_LO and AVR_OP_READ_LO are not defined in avrdude.conf for the mem type flash for this device, it uses a_div=1 (byte addressing) instead of a_div=2 (word addressing). So this be easily fixed in avrdude.conf.

From stk500.c stk500_paged_write():
if ((m->op[AVR_OP_LOADPAGE_LO]) || (m->op[AVR_OP_READ_LO]))
a_div = 2;
a_div = 1;

Copy and adapt the definitions from ATmega2560.

Michael Dreher <nospam2000>
Thu Apr 19 13:45:02 2012, comment #4:

Sorry, STK500v1 is not a priority to me right now.

Again, if anyone wants to supply patches, they're welcome.

Joerg Wunsch <joerg_wunsch>
Project Administrator
Fri Mar 19 07:58:15 2010, comment #3:

Thanks for the logfile. I just realized Arduino is still using
STK500v1 (it's probably the last consumer of that protocol :). I
don't think anybody did anything lately here (except for fixing the
Arduino reset), so if it works with Xmegas at all, it's purely as a
side-effect from other changes introduced to the generic code.

Patches would be very welcome. I think I've got some STK500v1
firmware still lying around somewhere, so I might be able to test it
on a real STK500 for comparison.

Joerg Wunsch <joerg_wunsch>
Project Administrator
Fri Mar 19 07:14:05 2010, comment #2:

attached are the input arduino sketch and the resulting avrdude trace.


(file #19981, file #19982)

giuliano carlini <gorillacoder>
Fri Mar 19 06:35:17 2010, comment #1:

Could you please attach a communication trace file? (Output
from avrdude -vvvv, captured in a text file.)

Joerg Wunsch <joerg_wunsch>
Project Administrator
Fri Mar 19 06:26:58 2010, original submission:

STK500 'U" command takes a word address. Indeed, avrdude seems to be passing word addresses to the arduino bootloader for atmega chips. However, avrdude seems to be passing byte addresses for xmega28a1.

giuliano carlini <gorillacoder>


Attached Files
file #19982:  avrdude-29264.log added by gorillacoder (63kB - application/octet-stream)
file #19981:  xmegaTest0.pde added by gorillacoder (805B - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by nospam2000 (Posted a comment)
  • -unavailable- added by nospam2000
  • -unavailable- added by joerg_wunsch (Posted a comment)
  • -unavailable- added by gorillacoder (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Mar 10 20:12:45 2013nospam2000Carbon-Copy-=>Added nospam2000
    Thu Apr 19 13:45:02 2012joerg_wunschPriority5 - Normal=>1 - Later
    Fri Mar 19 07:14:05 2010gorillacoderAttached File-=>Added xmegaTest0.pde, #19981
      Attached File-=>Added avrdude-29264.log, #19982

    Back to the top

    Powered by Savane 3.1-cleanup1