From 77d7094d3b66e16b06a96ffca7950bd9f4c5e03e Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 21 Jul 2025 19:03:24 +0800 Subject: [PATCH] reduce the pddb size for the vexii-test target --- libs/precursor-hal/Cargo.toml | 1 + libs/precursor-hal/src/board/precursor.rs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/libs/precursor-hal/Cargo.toml b/libs/precursor-hal/Cargo.toml index 91f4117b8..87bd27427 100644 --- a/libs/precursor-hal/Cargo.toml +++ b/libs/precursor-hal/Cargo.toml @@ -6,4 +6,5 @@ edition = "2021" [dependencies] [features] +vexii-test = [] default = [] diff --git a/libs/precursor-hal/src/board/precursor.rs b/libs/precursor-hal/src/board/precursor.rs index 071439229..e73e16533 100644 --- a/libs/precursor-hal/src/board/precursor.rs +++ b/libs/precursor-hal/src/board/precursor.rs @@ -29,6 +29,9 @@ pub const EC_FW_PKG_LEN: u32 = 0x0003_2000; pub const EC_REGION_LEN: u32 = 0x0008_0000; pub const PDDB_LOC: u32 = 0x01D8_0000; // PDDB start +#[cfg(feature = "vexii-test")] +pub const PDDB_LEN: u32 = 4096 * 1024; // shorter PDDB for faster testing +#[cfg(not(feature = "vexii-test"))] pub const PDDB_LEN: u32 = EC_REGION_LOC - PDDB_LOC; // must be 64k-aligned (bulk erase block size) for proper function. pub const SPINOR_ERASE_SIZE: u32 = 0x1000;