move to cargo-generate; start with QEMU

This commit is contained in:
Jorge Aparicio
2018-08-30 00:25:14 +02:00
parent 8a8466a560
commit 77a0685a17
19 changed files with 529 additions and 986 deletions

View File

@@ -6,13 +6,12 @@
#![no_std]
#[macro_use]
extern crate cortex_m_rt as rt;
extern crate cortex_m_rt;
extern crate cortex_m_semihosting as sh;
extern crate panic_semihosting;
use core::fmt::Write;
use rt::ExceptionFrame;
use sh::hio;
entry!(main);
@@ -23,15 +22,3 @@ fn main() -> ! {
loop {}
}
exception!(HardFault, hard_fault);
fn hard_fault(ef: &ExceptionFrame) -> ! {
panic!("HardFault at {:#?}", ef);
}
exception!(*, default_handler);
fn default_handler(irqn: i16) {
panic!("Unhandled exception (IRQn = {})", irqn);
}