Skip to content

Commit

Permalink
Use 72 KB heap for global allocator (like esp-rs examples recommend)
Browse files Browse the repository at this point in the history
  • Loading branch information
zargony committed Sep 27, 2024
1 parent b557cfe commit 34f7a0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion firmware/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ use esp_hal::timer::timg::TimerGroup;
use esp_println::println;
use log::{error, info};

extern crate alloc;

static VERSION_STR: &str = concat!("v", env!("CARGO_PKG_VERSION"));
static GIT_SHA_STR: &str = env!("GIT_SHORT_SHA");

Expand Down Expand Up @@ -101,7 +103,7 @@ async fn main(spawner: Spawner) {
let _led = AnyOutput::new(io.pins.gpio8, Level::High);

// Initialize global allocator
esp_alloc::heap_allocator!(128 * 1024);
esp_alloc::heap_allocator!(72 * 1024);

// Initialize async executor
let systimer = SystemTimer::new(peripherals.SYSTIMER);
Expand Down

0 comments on commit 34f7a0e

Please sign in to comment.