X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Fbootloader%2Fmain.rs;h=0f863fc4af6338c033edb1df7f847c7465196ce1;hb=dbda961b1cc62d8bbc155bd53d74a1fb52fed654;hp=e7746c0086c5829017c7b8dba60d6a0629038eea;hpb=0f94967856f0e0c4b2888c9de77abe64c5359b49;p=gps-watch.git diff --git a/src/bootloader/main.rs b/src/bootloader/main.rs index e7746c0..0f863fc 100644 --- a/src/bootloader/main.rs +++ b/src/bootloader/main.rs @@ -31,19 +31,28 @@ mod flash; mod bootloader; use common::clock; +use common::systick; use common::usb_serial; +extern { + fn jump_to_application(address: u32); +} + +const APPLICATION_ADDR: u32 = 0x0; + #[no_mangle] pub unsafe extern fn main() { clock::configure(); + systick::init(); if true { - usb_serial::init(); + usb_serial::init(0xf055, 0x635c); let mut b = bootloader::Bootloader::new(); - loop { - b.run(); + while b.run() { } } + + jump_to_application(__application_addr); }