From ec4752d228f3b637cfe606267b2ce58e72f81e82 Mon Sep 17 00:00:00 2001 From: bunnie Date: Wed, 19 Jun 2024 21:34:03 +0800 Subject: [PATCH] add mbox module; add swapper dependency swapper dependency is needed because we need to allocate some device RAM --- services/cram-console/Cargo.toml | 1 + services/cram-console/src/cmds.rs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/services/cram-console/Cargo.toml b/services/cram-console/Cargo.toml index fb3631b68..e34ae8982 100644 --- a/services/cram-console/Cargo.toml +++ b/services/cram-console/Cargo.toml @@ -27,6 +27,7 @@ usb-device-xous = { path = "../usb-device-xous", default-features = false } cramium-hal = { path = "../../libs/cramium-hal", features = ["std"] } cram-hal-service = { path = "../cram-hal-service" } ime-plugin-shell = { path = "../ime-plugin-shell" } +xous-swapper = { path = "../xous-swapper" } [features] "cramium-fpga" = ["utralib/cramium-fpga", "xous-pl230/cramium-fpga"] diff --git a/services/cram-console/src/cmds.rs b/services/cram-console/src/cmds.rs index 5ec223584..109ffa72b 100644 --- a/services/cram-console/src/cmds.rs +++ b/services/cram-console/src/cmds.rs @@ -92,6 +92,8 @@ mod pddb_cmd; use pddb_cmd::*; mod usb; use usb::*; +mod mbox; +use mbox::*; pub struct CmdEnv { common_env: CommonEnv, @@ -101,6 +103,7 @@ pub struct CmdEnv { #[cfg(feature = "pddb")] pddb_cmd: PddbCmd, usb_cmd: Usb, + mbox: Mbox, } impl CmdEnv { pub fn new(xns: &xous_names::XousNames) -> CmdEnv { @@ -130,6 +133,7 @@ impl CmdEnv { log::debug!("usb"); Usb::new() }, + mbox: Mbox::new(), } } @@ -152,6 +156,7 @@ impl CmdEnv { #[cfg(feature = "pddb")] &mut self.pddb_cmd, &mut self.usb_cmd, + &mut self.mbox, ]; if let Some(cmdline) = maybe_cmdline {