From: Tilman Sauerbeck Date: Sun, 7 Jul 2019 07:57:47 +0000 (+0200) Subject: bootloader: Jump to application code after serial communication is done. X-Git-Url: http://git.code-monkey.de/?a=commitdiff_plain;h=94010950b20f843266d509e0da9b7f212440d08f;p=gps-watch.git bootloader: Jump to application code after serial communication is done. --- 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); }