bessman / mcbootflash

Flash firmware to 16-bit Microchip devices running MCC bootloader
https://bessman.github.io/mcbootflash/
MIT License
16 stars 2 forks source link

Always erase #58

Closed bessman closed 4 months ago

bessman commented 4 months ago

The CLI tries to determine if an application already exists by doing self_verify, and skips erase if the result is negative. Problem is, a negative self_verify response only indicates that something is wrong with the existing application. It could be that is doesn't exist, but it could also be something else.

Since there is no way to determine if an application exists (short of a full readback, which is too time consuming), it is safer to always erase.