From aa4cc58b42c400b5b3b5cb572f12c353a2e7136f Mon Sep 17 00:00:00 2001 From: sawyer bristol Date: Fri, 31 Oct 2025 17:59:48 -0600 Subject: [PATCH] expand doom memory for pimoroni --- user-apps/doom/build.rs | 2 +- user-apps/doom/memory.x | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 user-apps/doom/memory.x diff --git a/user-apps/doom/build.rs b/user-apps/doom/build.rs index 1dfa714..9f67aed 100644 --- a/user-apps/doom/build.rs +++ b/user-apps/doom/build.rs @@ -23,7 +23,7 @@ fn main() { let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap()); File::create(out.join("memory.x")) .unwrap() - .write_all(include_bytes!("../memory.x")) + .write_all(include_bytes!("memory.x")) .unwrap(); println!("cargo:rustc-link-search={}", out.display()); diff --git a/user-apps/doom/memory.x b/user-apps/doom/memory.x new file mode 100644 index 0000000..02c35b4 --- /dev/null +++ b/user-apps/doom/memory.x @@ -0,0 +1,31 @@ +MEMORY +{ + RAM : ORIGIN = 0x0, LENGTH = 400K +} + +SECTIONS +{ + .text : ALIGN(4) + { + *(.text .text.*); + *(.rodata .rodata.*); + } > RAM + + .data : ALIGN(4) + { + *(.data .data.*); + } > RAM + + .bss : ALIGN(4) + { + *(.bss .bss.*); + *(COMMON); + } > RAM + + .syscall_table (NOLOAD) : ALIGN(4) + { + __user_reloc_start = .; + KEEP(*(.user_reloc*)); + __user_reloc_end = .; + } > RAM +}