avrdude-dev
[Top][All Lists]
Advanced

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

Re: [avrdude-dev] [RFC] stk500: skip empty pages


From: Theodore A. Roth
Subject: Re: [avrdude-dev] [RFC] stk500: skip empty pages
Date: Tue, 16 Sep 2003 10:21:56 -0700 (PDT)


On Tue, 16 Sep 2003, E. Weddington wrote:

> Hello all,
>
> Attached is a patch for the stk500, which skips empty pages on a paged
> write. This is useful in a project I have, where there is an application
> and a bootloader in a mega128. So there is a chunk of code at the
> begginning addresses and small chunck of code at a very high address and a
> whole lotta nothing in between. This will significantly speed up
> programming time.
>
> Now, this code assumes nothing about whether the chip was previously
> erased. If the chip was erased, the code behaves as expected. If the chip
> was not erased, then skipping over a page of 0xFFs does nothing more than
> trying to write 0xFFs (erased state) to an already programmed page, i.e.
> they both do nothing.
>
> Comments?

Is this valid for eeprom? I'm not sure if you should be skipping pages
for eeprom or not. Your patch as it stands makes not distinction
between eeprom or flash.

It might be more useful to push page skipping up to avr.c. Then all
paged programmers can benefit. Although moving it up to avr.c may not
be as clean with the current avr.c implementation, but my suggestion
for avr.c cleanup may help there.

Minor nits:
- Keep lines under 80 chars wide.
- Try to use existing coding style. Your use of braces isn't
  consistent with Brian's and spaces after if and for statement
  make for easier reading.

Ted Roth




reply via email to

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