From e3c244f48b84d1f06a0f6718b417d12f7c542b70 Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 3 May 2024 18:46:33 +0800 Subject: [PATCH] add option for app-uart setup by loader --- services/cram-hal-service/Cargo.toml | 3 ++- services/cram-hal-service/src/main.rs | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/services/cram-hal-service/Cargo.toml b/services/cram-hal-service/Cargo.toml index 097c37986..f6d723626 100644 --- a/services/cram-hal-service/Cargo.toml +++ b/services/cram-hal-service/Cargo.toml @@ -31,6 +31,7 @@ rkyv = { version = "0.4.3", default-features = false, features = [ ] } [features] +app-uart = [] # add this feature to enable pre-emption quantum-timer = ["utralib"] -default = ["quantum-timer"] +default = ["quantum-timer", "app-uart"] diff --git a/services/cram-hal-service/src/main.rs b/services/cram-hal-service/src/main.rs index 21f825f53..c427333a0 100644 --- a/services/cram-hal-service/src/main.rs +++ b/services/cram-hal-service/src/main.rs @@ -105,6 +105,8 @@ fn main() { // Second page from top of IFRAM0 is occupied by the swap handler. This was allocated // by the loader, before the kernel even started. ifram_allocs[0][30] = Some(Sender::from_usize(SWAPPER_PID as usize)); + #[cfg(feature="app-uart")] + ifram_allocs[0][29] = Some(Sender::from_usize(SWAPPER_PID as usize)); // currently allocated to swapper for debug let iox_page = xous::syscall::map_memory( xous::MemoryAddress::new(utralib::generated::HW_IOX_BASE),