#![feature(used)]
#![no_std]
extern crate cortex_m;
extern crate cortex_m_rt;
use core::ptr;
use cortex_m::{asm, exception};
fn main() {
unsafe {
ptr::read_volatile(0x2FFF_FFFF as *const u32);
}
}
extern "C" fn hard_fault(_: exception::HardFault) {
asm::bkpt()
}
#[allow(dead_code)]
#[used]
#[link_section = ".rodata.exceptions"]
static EXCEPTIONS: exception::Handlers = exception::Handlers {
hard_fault: hard_fault,
..exception::DEFAULT_HANDLERS
};
#[allow(dead_code)]
#[used]
#[link_section = ".rodata.interrupts"]
static INTERRUPTS: [extern "C" fn(); 240] = [default_handler; 240];
extern "C" fn default_handler() {
asm::bkpt();
}