common: Move panic handler out of libcommon.
[gps-watch.git] / src / bootloader / main.rs
index 321166c55a55f9bde891b5ec32db1ae804d3f8ce..2ce598050464a12deedb8c32c94153ca319f653e 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #![no_std]
-#![crate_type="staticlib"]
+#![no_main]
 #[link(name="libcommon.rlib")]
 
 extern crate common;
@@ -83,8 +83,15 @@ fn bootloader_requested() -> bool {
     false
 }
 
+#[inline(never)]
+#[panic_handler]
+fn panic(_info: &core::panic::PanicInfo) -> ! {
+    loop {
+    }
+}
+
 #[no_mangle]
-pub unsafe extern fn main() {
+pub unsafe extern "C" fn _start() -> ! {
     watchdog::disable();
     clock::configure();
     systick::init();