avrdude-dev
[Top][All Lists]
Advanced

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

[avrdude-dev] Unclear documentation in relation to chip erase


From: Matthew Mondor
Subject: [avrdude-dev] Unclear documentation in relation to chip erase
Date: Mon, 18 Mar 2019 04:51:10 -0400

Hello all,

I was confused by the documentation about chip erase.  Its imporant
points:

- Erasing is important to write, unless switching bits from 1 to 0 only
- -D allows to disable it, but this is questionable because of the above
- Page erase operation is only supported by some chips like xmega

My experience was that to program an AVR chip, a bootloader must always
be part of the image and fuse bits always specified, otherwise it was
impossible to then use ISP via the programmer.

The simple explanation is that the SPM self-programming instruction
used by bootloaders do allow to erase and program individual pages.
When programming via the bootloader, -D is advised to preserve fuse
bits and the bootloader; sending small images that don't include the
bootloader then trivial, without affecting fuse bits or the bootloader.

I thus recommend adding the following to the documentation of -D:


This option is useful when flashing through bootloaders for
self-programming (the AVR SPM instruction used by avrisp bootloaders
support the update of specific individual pages).


I probably should have sent a PR for this, but failed to find the submit
feature.  If anyone can update the code or submit said PR, I would be
grateful.

Many thanks,
-- 
Matt



reply via email to

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