The problem is that -D option disables auto erase of flash and when using Arduino as programmer omitting this particular phase very often (often = always on all my programmers and AVR chips) causes mismatch errors:
Of course one can set empty value to upload_flags to mitigate this problem.
But since -D is not enabled by default in avrdude, maybe it should not be in platformio?
By default
upload_protocol
contains-D
option when usingavrisp
asupload_protocol
.Example:
Such configuration...
...will give more or less such
avrdude
command:The problem is that
-D
option disables auto erase of flash and when using Arduino as programmer omitting this particular phase very often (often = always on all my programmers and AVR chips) causes mismatch errors:Without
-D
option everything works as a charm.Of course one can set empty value to
upload_flags
to mitigate this problem. But since-D
is not enabled by default inavrdude
, maybe it should not be in platformio?