From 86b079f2f49d86ab371265ecb156c2f0eed348b9 Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 5 May 2025 01:49:05 +0800 Subject: [PATCH] add spinor defs to cramium-emu this is a shim that reps both boards and "chips" for hosted mode so it's OK to mash them together as a synthetic target --- services/cramium-emu/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/services/cramium-emu/src/lib.rs b/services/cramium-emu/src/lib.rs index 7c97f57da..54c9d3d7f 100644 --- a/services/cramium-emu/src/lib.rs +++ b/services/cramium-emu/src/lib.rs @@ -4,3 +4,10 @@ pub mod i2c; pub mod keyboard; pub mod trng; pub mod udma; + +pub const SPINOR_PAGE_LEN: u32 = 0x100; +pub const SPINOR_ERASE_SIZE: u32 = 0x1000; // this is the smallest sector size. +pub const SPINOR_BULK_ERASE_SIZE: u32 = 0x1_0000; // this is the bulk erase size. +pub const SPINOR_LEN: u32 = 16384 * 1024; +pub const PDDB_LOC: u32 = 4096 * 1024; // located 4MiB in, after the swap image +pub const PDDB_LEN: u32 = 4096 * 1024; // 4MiB data for the PDDB total