extern crate common;
mod flash;
+mod bootloader;
use common::clock;
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();
if true {
usb_serial::init();
- loop {
+ let mut b = bootloader::Bootloader::new();
+
+ while b.run() {
}
}
+
+ jump_to_application(__application_addr);
}