"I can't seem to get alloc to..." <- > <@michael.desilva:matrix.org> I can't seem to get alloc to work with Embassy stm32 any ideas? > > ```rust > use cortex_m_alloc::CortexMHeap; > > // Heap allocator > #[global_allocator] > pub static ALLOCATOR: CortexMHeap = CortexMHeap::empty(); > > // ...snip > // This crashes on `to_string()` > if let Some(dt) = dt_opt { > // let dt_rfc2822 = dt.to_rfc2822(); > // let now = dt_rfc2822.as_str(); > let now = dt.timestamp().to_string(); > info!("loop: Got RTC! {=str}", now); > } > > 0.017211 INFO Got RTC! 1589538615 > └─ stm32h747_async_quickstart::____embassy_main_task::{async_fn#0} @ src/main.rs:105 > 20.634704 INFO low > └─ stm32h747_async_quickstart::____embassy_main_task::{async_fn#0} @ src/main.rs:113 > 20.934722 INFO vrefint: 24575 > └─ stm32h747_async_quickstart::____embassy_main_task::{async_fn#0} @ src/main.rs:118 > 20.934722 INFO measured: 14930 > └─ stm32h747_async_quickstart::____embassy_main_task::{async_fn#0} @ src/main.rs:120 > 45.742980 ERROR panicked at library/alloc/src/alloc.rs:418:13: > memory allocation of 10 bytes failed > └─ panic_probe::print_defmt::print @ /Users/mdesilva/.cargo/registry/src/index.crates.io-6f17d22bba15001f/panic-probe-0.3.1/src/lib.rs:104 > > ``` Ah, I forgot to allocate the RAM in SDRAM for alloc