avrdude-dev
[Top][All Lists]
Advanced

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

Re: [avrdude-dev] stk500 and firmware 1.14


From: Brian Dean
Subject: Re: [avrdude-dev] stk500 and firmware 1.14
Date: Thu, 20 Feb 2003 01:00:55 -0500
User-agent: Mutt/1.4i

On Wed, Feb 19, 2003 at 09:30:09PM -0800, Theodore A. Roth wrote:

> I'd call that RESET_DISABLE, since a value of 1 there seems to disable the 
> reset pin for io. Still vague on it though. Jason Kyle seems to understand 
> it better than I do. ;-)

I was planning to call it 'reset' but have it be assigned values of
'dedicated' or 'io' (meaning the reset pin may be configured as an I/O
pin - for an example of this, see the ATmega8), the default being
'dedicated'.  The actual variable in the AVRPART structure, I called
that 'reset_disposition' :-) I know, my variable names are too long
...  In the code, I've got enums for RESET_DEDICATED and RESET_IO,
values 0 and 1 respectively.  Will that work?  (see patch)

> How do you set up the flash and eeprom page sizes for programming? The 
> eeprom page size is in the ext dev params and the flash size is in the 
> regular dev params.
> 
> Oh, page_size can be given in the config file under 'memory "flash"'. You
> might need to add page_size for the 'memory "eeprom"' section too.

Yes, that's what I did.  However, the use of "paged" with regard to
eeprom memory seems to be a bit inconsistant.  With respect to flash,
it seems to imply that you need to use the "load page/write page"
instructions.  But none of the eeproms on any of their parts use
those, but, at least for for the ATmega128, it says the page size of
the eeprom is 8 bytes when talking about parallel programming.  So I'm
a bit confused about Atmel's use of the term.

At any rate, at present, avrdude lets you set the page size of a
memory, even though "paged" is set to 'no'.  But since setting 'paged'
to 'yes' implies a different programming algorithm, it would be an
error to set it to 'yes' for the eeprom memories.  But as long as we
put a comment in the config file, I think it should be OK to set the
page size of the eeprom, but leave 'paged' set to 'no' - or would that
be too confusing?

> I don't think you need num_pages in the config. Can't you calculate it from 
> size/page_size?

Probably.  If I recall, back before I had the instruction sequences
encoded in the config file, I tried to figure out the address masks
using an algorithmic approach based on the size of the memory and the
number of pages.  So it's probably a hold-over from the earlier code.
We can axe it at some point.

Let me know if you are OK with the attached patch - I haven't done
anything with the extended dev command yet, just trying to get the
data needed for it at this point.

-Brian

Attachment: avrdude.patch
Description: Text document


reply via email to

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