Skip to content

Commit 465d65e

Browse files
committed
Updated example.
1 parent 08fb0f9 commit 465d65e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/lib.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,18 @@
77
//! extern crate alloc_cortex_m;
88
//! extern crate collections;
99
//!
10-
//! use alloc_cortex_m::init as alloc_init;
10+
//! use alloc_cortex_m;
1111
//! use collections::Vec;
1212
//!
13+
//! pub unsafe extern "C" fn reset_vector() {
14+
//! let heap_start: *mut usize = &mut _heap_start;
15+
//! let heap_end: *mut usize = &mut _heap_end;
16+
//! }
17+
//!
1318
//! #[no_mangle]
1419
//! pub fn main() -> ! {
1520
//! // Initialize the heap BEFORE you use the allocator
16-
//! unsafe { alloc_init(0x2000_0000, 1024) }
21+
//! unsafe { alloc_cortex_m::init(heap_start, heap_end) }
1722
//!
1823
//! let mut xs = Vec::new();
1924
//! xs.push(1);

0 commit comments

Comments
 (0)