Finish bootloader by adding jump to user code

This commit is contained in:
BlackMark 2020-04-12 15:32:31 +02:00
parent 5f8d6a6f85
commit 807b1f336f

View File

@ -586,8 +586,6 @@ int main()
}
if (timeout == 0) {
timeout = TIMEOUT;
if (chipEraseFlag == ChipEraseState::PERFORM) {
performChipErase();
chipEraseFlag = ChipEraseState::NONE;
@ -595,6 +593,10 @@ int main()
performChipErase(finishEraseAddress);
chipEraseFlag = ChipEraseState::NONE;
}
typedef void (*jump_fn)() __attribute__((naked, noreturn));
constexpr jump_fn boot = 0x0000;
boot();
}
}