From 94010950b20f843266d509e0da9b7f212440d08f Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Sun, 7 Jul 2019 09:57:47 +0200 Subject: [PATCH] bootloader: Jump to application code after serial communication is done. --- src/bootloader/main.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/bootloader/main.rs b/src/bootloader/main.rs index f54b4bc..d83702e 100644 --- a/src/bootloader/main.rs +++ b/src/bootloader/main.rs @@ -33,6 +33,10 @@ mod bootloader; use common::clock; use common::usb_serial; +extern { + fn jump_to_application(address: u32); +} + const APPLICATION_ADDR: u32 = 0x0; #[no_mangle] @@ -44,8 +48,9 @@ pub unsafe extern fn main() { let mut b = bootloader::Bootloader::new(); - loop { - b.run(); + while b.run() { } } + + jump_to_application(__application_addr); } -- 2.30.2