From 44ec809713c7488fffca9fe7756a1a1f352b1011 Mon Sep 17 00:00:00 2001 From: bunnie Date: Wed, 1 Jan 2025 22:45:07 +0800 Subject: [PATCH] add cramium-sim target this allows us to build a simulation-focused xous image this was previously called cramium-fpga but that precise configuration is less accurate as the simulation environment makes more shortcuts (and can include more peripherals) than the fpga environment. --- xtask/src/builder.rs | 2 ++ xtask/src/main.rs | 22 ++++++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/xtask/src/builder.rs b/xtask/src/builder.rs index 47daabc3d..3676f9cfe 100644 --- a/xtask/src/builder.rs +++ b/xtask/src/builder.rs @@ -1012,6 +1012,8 @@ impl Builder { args.push("atsama5d2"); } else if self.utra_target.contains("cramium-soc") { args.push("cramium-soc") + } else if self.utra_target.contains("cramium-fpga") { + args.push("cramium-soc") } args.push("--"); diff --git a/xtask/src/main.rs b/xtask/src/main.rs index a9b9cd86d..dd87805e2 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -516,17 +516,22 @@ fn main() -> Result<(), Box> { } // ------ Cramium hardware image configs ------ - Some("cramium-fpga") | Some("cramium-soc") => { - let board = "board-dabao"; - // select the board - builder.add_feature(board); - builder.add_loader_feature(board); - builder.add_kernel_feature(board); + Some("cramium-sim") | Some("cramium-soc") => { + match task.as_deref() { + Some("cramium-soc") => { + let board = "board-dabao"; + // select the board + builder.add_feature(board); + builder.add_loader_feature(board); + builder.add_kernel_feature(board); + } + _ => (), // don't add any board because this is simulation + }; // placement in flash is a tension between dev convenience and RAM usage. Things in flash // are resident, non-swapable, but end up making the slow kernel burn process take longer. let cramium_flash_pkgs = - ["xous-ticktimer", "xous-log", "xous-names" /* "cram-hal-service" */].to_vec(); + ["xous-log", "xous-names", "cram-mbox1", "cram-mbox2" /* "cram-hal-service" */].to_vec(); let cramium_swap_pkgs = [].to_vec(); builder.add_loader_feature("debug-print"); @@ -541,7 +546,7 @@ fn main() -> Result<(), Box> { builder.add_loader_feature("sram-margin"); match task.as_deref() { - Some("cramium-fpga") => builder.target_cramium_fpga(), + Some("cramium-sim") => builder.target_cramium_fpga(), Some("cramium-soc") => builder.target_cramium_soc(), _ => panic!("should be unreachable"), }; @@ -787,6 +792,7 @@ Hardware images: av-test automation framework for TRNG testing (AV directly, no CPRNG). [cratespecs] ignored. tiny Precursor tiny image. For testing with services built out-of-tree. cramium-soc BSP validation image for Cramium. Contains a superset of features, in various states of testing. + cramium-sim Tiny target for verilator simulation baosec Baosec application target image. Hosted emulation: