From 3afda0ebf9ac7f3d463cae5f369134448642fdaf Mon Sep 17 00:00:00 2001 From: BlackMark Date: Sun, 12 Apr 2020 16:05:16 +0200 Subject: [PATCH] Replace function call to user code with jump --- stk500v2/main.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/stk500v2/main.cpp b/stk500v2/main.cpp index 8f18e5c..8a43c13 100644 --- a/stk500v2/main.cpp +++ b/stk500v2/main.cpp @@ -594,9 +594,7 @@ int main() chipEraseFlag = ChipEraseState::NONE; } - typedef void (*jump_fn)() __attribute__((naked, noreturn)); - constexpr jump_fn boot = 0x0000; - boot(); + asm volatile("jmp 0x0000"); } }