diff --git a/stk500v2/main.cpp b/stk500v2/main.cpp index ce48f13..8f18e5c 100644 --- a/stk500v2/main.cpp +++ b/stk500v2/main.cpp @@ -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(); } }