Hello,
Today I had a case where I tried to perform a bootloader-only DFU on a device with a debug version of the bootloader, but instead of trying to replace it with another debug version, I tried to replace it with a release version. I was not aware that the device had a debug version of the bootloader and bricked it.
As I understand it, the device got bricked because the start address of the new bootloader didn't match with the old one, i.e. vector table is in the wrong place and it just doesn't work (correct me if I'm wrong please).
My question is, how can I prevent this situation? I want the bootloader to reject any bootloader updates that could brick the device like this. I know that a bigger bootloader would be rejected (e.g. trying to flash a debug version on a release version), but a smaller version has no problems and can still potentially brick the device if the start addresses are different.
Is there anything I can do to prevent this?
Thanks for your advice!