Finish bootloader by adding jump to user code
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user