add option for app-uart setup by loader

This commit is contained in:
bunnie 2024-05-03 18:46:33 +08:00
parent 8f0634845e
commit e3c244f48b
2 changed files with 4 additions and 1 deletions

View file

@ -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"]

View file

@ -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),