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.ke...@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