There is a bug in bootloader_app_is_valid
in the bootloader
if (DFU_BANK_0_REGION_START == EMPTY_FLASH_MASK)
{
return false;
}
What is probably meant:
uint32_t val = *(uint32_t*)DFU_BANK_0_REGION_START;
if (val == EMPTY_FLASH_MASK)
{
return false;
}
DFU_BANK_0_REGION_START
is a macro, so it doesn't make sense to compare it with 0xFFFFFFFF
, except if you mean the value stored at DFU_BANK_0_REGION_START
instead, which makes totally sense.