application can never boot with undefined `ENABLE_CHECKSUM`
diggit opened this issue · 2 comments
diggit commented
Not defining ENABLE_CHECKSUM
causes imagesize = 0
.
later follows code...
uint32_t xorv = 0xB4DC0FEE;
for (unsigned i = 0; i < imagesize; i++) // compiler knows, there will be 0 iterations
xorv ^= base_addr[i];
if (xorv == 0) { // this branch can never happen with zero iterations of the loop above
//... unreachable code, including jump to app
}
"checksum" part of code should also be disabled when ENABLE_CHECKSUM
is not defined.
fa1ke5 commented
Мало того, эта часть когда принципиально не работает, попытка использовать чексумму вызовет невозможность запуска основной программы
davidgfnet commented
I just pushed d11fbc8 which should fix it. Thanks for the report, I missed it completely when I updated the checksum function!