Re: Programming an ATmega64 with avrdude

Brian Dean <[email protected]> Thu, 13 Nov 2003 10:12:54 -0500
Newsgroups gmane.comp.hardware.avr.general
Message-ID <[email protected]>
Hi Erik,

On Thu, Nov 13, 2003 at 05:06:32PM +1100, Erik Christiansen wrote:

> Finding that:  avrdude -p m64 -c stk500 -e -U flash:w:obj/flash.srec
> gives "avrdude: AVR Part "m64" not found", I checked on Savannah that:
> 
>  o I'm using the latest version. (4.2.0)
> 
>  o There's no mention of (m64|mega64|ATmega64) in the list archive.
> 
> Now I'm wondering if an existing part description is suitable for use
> with the ATmega64? (It doesn't seem plausible that I could be the
> first to stumble in this direction.)
> 
> I can hack the obvious stuff in the avrdude.conf entry for m128, but
> half way through it becomes pretty scary.

Actually, you can use the ATmega128 definition as is, just be careful
not to exceed the memory sizes.  Once, I actually installed an
ATmega64 onto one of my MAVRIC boards by mistake, thinking it was an
ATmega128 (parts drawer mix up - don't ask).  I set the fuse bits as
for an ATmega128, programmed the chip, erased, etc, etc, and it ran
all my tests just fine.  It was only later that I noticed that I had
installed the wrong chip.

But to do it right, double check the datasheet, back in the serial
programming section you should find all the parameters necessary.
Start with the ATmega128 entry in avrdude.conf and make the necessary
changes.  I suspect the main changes will be for the memory sizes.  I
have attempted to make the command string syntax in the avrdude.conf
file for the memory read/write commands to be very similar to the way
Atmel specifies them in their datasheets.

If you send me a copy of the new part entry, I'd be happy to look it
over and integrate it into the distribution so that it will be present
in the next release (creditting you for the contribution, of course).

-Brian
-- 
Brian Dean, [email protected]
BDMICRO - Maker of the MAVRIC ATmega128 Dev Board
http://www.bdmicro.com/