aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/stm32.ld23
1 files changed, 17 insertions, 6 deletions
diff --git a/cmake/stm32.ld b/cmake/stm32.ld
index ea06a98..d15b4c2 100644
--- a/cmake/stm32.ld
+++ b/cmake/stm32.ld
@@ -13,13 +13,8 @@ MEMORY
MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K
}
-_data_start = ORIGIN(RAM);
-_data_end = ORIGIN(RAM) + LENGTH(RAM);
_estack = ORIGIN(RAM) + LENGTH(RAM);
-_Min_Heap_Size = 0; /* required amount of heap */
-_Min_Stack_Size = 0x100; /* required amount of stack */
-
SECTIONS
{
.text :
@@ -28,10 +23,26 @@ SECTIONS
init.s:(.text)
*(.text)
KEEP(*(.text.*))
+ *(.rodata*)
} >FLASH
- .data :
+ . = ORIGIN(RAM);
+
+ .data ALIGN(4) :
{
*(.data*)
+ } >RAM AT >FLASH
+
+ .bss ALIGN(4) (NOLOAD) :
+ {
+ *(.bss)
+ *(.bss.*)
} >RAM
+
+ _copy_data_store = ADDR(.data);
+ _copy_data_store_end = _copy_data_store + SIZEOF(.data);
+ _copy_data_load = LOADADDR(.data);
+
+ _bss_start = ADDR(.bss);
+ _bss_end = _bss_start + SIZEOF(.bss);
}