Fix alloc example
This commit is contained in:
@@ -15,7 +15,7 @@ panic-halt = "0.2.0"
|
|||||||
# panic-itm = "0.4.1"
|
# panic-itm = "0.4.1"
|
||||||
|
|
||||||
# Uncomment for the allocator example.
|
# Uncomment for the allocator example.
|
||||||
# alloc-cortex-m = "0.3.5"
|
# alloc-cortex-m = "0.4.0"
|
||||||
|
|
||||||
# Uncomment for the device example.
|
# Uncomment for the device example.
|
||||||
# Update `memory.x`, set target to `thumbv7em-none-eabihf` in `.cargo/config`,
|
# Update `memory.x`, set target to `thumbv7em-none-eabihf` in `.cargo/config`,
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
//!
|
//!
|
||||||
//! ---
|
//! ---
|
||||||
|
|
||||||
#![feature(alloc)]
|
|
||||||
#![feature(alloc_error_handler)]
|
#![feature(alloc_error_handler)]
|
||||||
#![no_main]
|
#![no_main]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
@@ -23,7 +22,7 @@ use core::alloc::Layout;
|
|||||||
use alloc_cortex_m::CortexMHeap;
|
use alloc_cortex_m::CortexMHeap;
|
||||||
use cortex_m::asm;
|
use cortex_m::asm;
|
||||||
use cortex_m_rt::entry;
|
use cortex_m_rt::entry;
|
||||||
use cortex_m_semihosting::hprintln;
|
use cortex_m_semihosting::{hprintln, debug};
|
||||||
|
|
||||||
// this is the allocator the application will use
|
// this is the allocator the application will use
|
||||||
#[global_allocator]
|
#[global_allocator]
|
||||||
|
|||||||
Reference in New Issue
Block a user