fix some warnings
This commit is contained in:
@@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
#![feature(alloc)]
|
#![feature(alloc)]
|
||||||
#![feature(alloc_error_handler)]
|
#![feature(alloc_error_handler)]
|
||||||
#![feature(global_allocator)]
|
|
||||||
#![feature(lang_items)]
|
#![feature(lang_items)]
|
||||||
#![no_main]
|
#![no_main]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
@@ -58,7 +57,7 @@ fn main() -> ! {
|
|||||||
// define what happens in an Out Of Memory (OOM) condition
|
// define what happens in an Out Of Memory (OOM) condition
|
||||||
#[alloc_error_handler]
|
#[alloc_error_handler]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub fn alloc_error(layout: Layout) -> ! {
|
pub fn alloc_error(_layout: Layout) -> ! {
|
||||||
asm::bkpt();
|
asm::bkpt();
|
||||||
|
|
||||||
loop {}
|
loop {}
|
||||||
|
|||||||
@@ -21,14 +21,13 @@
|
|||||||
|
|
||||||
extern crate cortex_m;
|
extern crate cortex_m;
|
||||||
|
|
||||||
#[macro_use(entry, exception)]
|
#[macro_use(entry)]
|
||||||
extern crate cortex_m_rt as rt;
|
extern crate cortex_m_rt as rt;
|
||||||
|
|
||||||
// makes `panic!` print messages to the host stderr using semihosting
|
// makes `panic!` print messages to the host stderr using semihosting
|
||||||
extern crate panic_semihosting;
|
extern crate panic_semihosting;
|
||||||
|
|
||||||
use cortex_m::asm;
|
use cortex_m::asm;
|
||||||
use rt::ExceptionFrame;
|
|
||||||
|
|
||||||
// the program entry point is ...
|
// the program entry point is ...
|
||||||
entry!(main);
|
entry!(main);
|
||||||
|
|||||||
Reference in New Issue
Block a user