From 1cc8645781d5b3a809e70ef274329b103231cb24 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 12 Jul 2024 10:56:05 +0200 Subject: [PATCH] add original memory.x --- scripts/memory.x | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 scripts/memory.x diff --git a/scripts/memory.x b/scripts/memory.x new file mode 100644 index 0000000..811b87a --- /dev/null +++ b/scripts/memory.x @@ -0,0 +1,23 @@ +MEMORY +{ + FLASH : ORIGIN = 0x00000000, LENGTH = 256K + /* RAM is a mandatory region. This RAM refers to the SRAM_0 */ + RAM : ORIGIN = 0x1FFF8000, LENGTH = 32K + SRAM_1 : ORIGIN = 0x20000000, LENGTH = 32K +} + +/* This is where the call stack will be allocated. */ +/* The stack is of the full descending type. */ +/* NOTE Do NOT modify `_stack_start` unless you know what you are doing */ +/* SRAM_0 can be used for all busses: Instruction, Data and System */ +/* SRAM_1 only supports the system bus */ +_stack_start = ORIGIN(RAM) + LENGTH(RAM); + +/* Define sections for placing symbols into the extra memory regions above. */ +/* This makes them accessible from code. */ +SECTIONS { + .sram1 (NOLOAD) : ALIGN(8) { + *(.sram1 .sram1.*); + . = ALIGN(4); + } > SRAM_1 +};