Finish bootloader by adding jump to user code
This commit is contained in:
parent
5f8d6a6f85
commit
807b1f336f
@ -586,8 +586,6 @@ int main()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (timeout == 0) {
|
if (timeout == 0) {
|
||||||
timeout = TIMEOUT;
|
|
||||||
|
|
||||||
if (chipEraseFlag == ChipEraseState::PERFORM) {
|
if (chipEraseFlag == ChipEraseState::PERFORM) {
|
||||||
performChipErase();
|
performChipErase();
|
||||||
chipEraseFlag = ChipEraseState::NONE;
|
chipEraseFlag = ChipEraseState::NONE;
|
||||||
@ -595,6 +593,10 @@ int main()
|
|||||||
performChipErase(finishEraseAddress);
|
performChipErase(finishEraseAddress);
|
||||||
chipEraseFlag = ChipEraseState::NONE;
|
chipEraseFlag = ChipEraseState::NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef void (*jump_fn)() __attribute__((naked, noreturn));
|
||||||
|
constexpr jump_fn boot = 0x0000;
|
||||||
|
boot();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user