pm-kit: isolation step 2 — heap init only (16KB), no parse, draw_ui
If blue → the 96KB heap memory was colliding (stack/buffer). If still black → the allocator's presence itself. Narrowing the heap/display interaction. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9e2e833485
commit
7faca6d0d7
1 changed files with 2 additions and 2 deletions
|
|
@ -59,7 +59,7 @@ fn main() -> ! {
|
||||||
// heap for track parsing (track-format uses alloc). RP2350 has 520 KB SRAM.
|
// heap for track parsing (track-format uses alloc). RP2350 has 520 KB SRAM.
|
||||||
{
|
{
|
||||||
use core::mem::MaybeUninit;
|
use core::mem::MaybeUninit;
|
||||||
const HEAP_SIZE: usize = 96 * 1024;
|
const HEAP_SIZE: usize = 16 * 1024;
|
||||||
static mut HEAP_MEM: [MaybeUninit<u8>; HEAP_SIZE] = [MaybeUninit::uninit(); HEAP_SIZE];
|
static mut HEAP_MEM: [MaybeUninit<u8>; HEAP_SIZE] = [MaybeUninit::uninit(); HEAP_SIZE];
|
||||||
unsafe { HEAP.init(core::ptr::addr_of_mut!(HEAP_MEM) as usize, HEAP_SIZE) }
|
unsafe { HEAP.init(core::ptr::addr_of_mut!(HEAP_MEM) as usize, HEAP_SIZE) }
|
||||||
}
|
}
|
||||||
|
|
@ -155,7 +155,7 @@ fn main() -> ! {
|
||||||
// confirmed-working pattern in a loop. No inputs/audio/clock. If the screen shows blue +
|
// confirmed-working pattern in a loop. No inputs/audio/clock. If the screen shows blue +
|
||||||
// corners → heap + parse + display are all fine and the bug is in the metronome loop logic.
|
// corners → heap + parse + display are all fine and the bug is in the metronome loop logic.
|
||||||
// If still black → the heap/parse path breaks the display.
|
// If still black → the heap/parse path breaks the display.
|
||||||
let _t = track_format::parse("t120;kick:4=Xxxx;snare:4=.X.X");
|
// (parse removed for this test — heap init only)
|
||||||
let mut hb = false;
|
let mut hb = false;
|
||||||
let mut hb_us = 0u64;
|
let mut hb_us = 0u64;
|
||||||
led.set_low().unwrap();
|
led.set_low().unwrap();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue