avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] ATMega2560 and stk500


From: Alan Horstmann
Subject: Re: [avrdude-dev] ATMega2560 and stk500
Date: Sun, 8 Dec 2013 22:14:45 +0000
User-agent: KMail/1.9.1

Hi again,

On Saturday 07 December 2013 13:46, I wrote:
> In brief:
> When programming the ATMega2560 using an stk500 (v1) compatible ISP,
> avrdude doesn't set the extended address byte in the target device.  As a
> result it cannot be certain whether it is programming above or below the
> 128K bytes threshold.  One manifestation of this is reports of verify
> errors at 0x1e000 when programming the Mega2560 bootloader using the
> ArduinoISP.  A patch that resolves this is attached - modifying the stk500
> code to set the extended byte when necessary.

<snip>

> This could be fixed in other different ways - and may be better pushed up
> the layers in avrdude into avr.c; I am posting for your comments, awareness
> etc. If there is important info missed, ask and I will try to respond.

Had more chance to study the workings of avrdude (rather than being focused on 
the ISP<->target-SPI interactions) and have re-worked the fix-patch along the 
lines of other code in avrdude that handles the ext_addr_byte, using the 
OPCODE etc.- so here is version 2.

Hopefully this is much closer to a correct solution here - so I would 
appreciate review comments etc and consideration for inclusion.  Then stk500 
could perhaps be added to the list of ISPs that work with the Mega2560?

With this patch applied, programming either half of the Mega2560 256K flash 
works correctly with an stk500 (v1) ISP.

Regards

Alan

Attachment: stk500-256K-fix2.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]