avrdude-dev
[Top][All Lists]
Advanced

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

Re: is the 2560 flash not actually 256 KBytes? avrdude writes/reads 2612


From: Didrik Madheden
Subject: Re: is the 2560 flash not actually 256 KBytes? avrdude writes/reads 261258 bytes
Date: Mon, 14 Jun 2021 23:36:49 +0200

No, the flash is exactly 256*1024 bytes as you expect. I would guess that
it omits writing trailing 0xFF bytes, since all bytes are 0xFF after
they're erased anyway. Either your program is so big that it fills up
almost the full memory except 886 unused bytes, or your program contains a
bootloader. Bootloaders are always placed near the top of the flash memory
in AVR uC's. For a small program without a bootloader, this improves write
times significantly.

/Didrik

On Mon, Jun 14, 2021 at 11:14 PM Britton Kerin <britton.kerin@gmail.com>
wrote:

> avrdude -c avrispmkII -p m2560 -P usb -U flash:r:downloaded_image:r
>
> produces a file 261258 byts long.
>
> When writing the flash I get a message:
>
> avrdude: 261258 bytes of flash written
>
> I expected this number to be 262144.
>
> Is the 2560 flash memory actually slightly smaller than the start of
> the datasheet states, or is avrdude doing something strange?
>
> Britton
>
>


reply via email to

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