diff --git a/rp2040-hal/Cargo.toml b/rp2040-hal/Cargo.toml index 9e0c9905b..bae64a811 100644 --- a/rp2040-hal/Cargo.toml +++ b/rp2040-hal/Cargo.toml @@ -64,7 +64,7 @@ futures = { version = "0.3.30", default-features = false, features = [ defmt-rtt = "0.4.0" panic-probe = { version = "0.3.1", features = ["print-defmt"] } defmt = "0.3" -alloc-cortex-m = "0.4.4" +embedded-alloc = "0.5.1" [features] # Minimal startup / runtime for Cortex-M microcontrollers diff --git a/rp2040-hal/examples/alloc.rs b/rp2040-hal/examples/alloc.rs index db61639b0..c7b151323 100644 --- a/rp2040-hal/examples/alloc.rs +++ b/rp2040-hal/examples/alloc.rs @@ -17,13 +17,13 @@ extern crate alloc; use alloc::vec::Vec; -use alloc_cortex_m::CortexMHeap; +use embedded_alloc::Heap; // The macro for our start-up function use cortex_m_rt::entry; #[global_allocator] -static ALLOCATOR: CortexMHeap = CortexMHeap::empty(); +static ALLOCATOR: Heap = Heap::empty(); // Ensure we halt the program on panic (if we don't mention this crate it won't // be linked)