bootloader: Define application offset.
[gps-watch.git] / src / bootloader / main.rs
index fbd3aa0c01c03d6bbe34352e97b5349920f1a6ad..f54b4bcea02d8dbf161bf9f50fefb31e4a140699 100644 (file)
 
 extern crate common;
 
+mod flash;
+mod bootloader;
+
 use common::clock;
 use common::usb_serial;
 
+const APPLICATION_ADDR: u32 = 0x0;
+
 #[no_mangle]
 pub unsafe extern fn main() {
     clock::configure();
@@ -37,7 +42,10 @@ pub unsafe extern fn main() {
     if true {
         usb_serial::init();
 
+        let mut b = bootloader::Bootloader::new();
+
         loop {
+            b.run();
         }
     }
 }