circuitpython/ports/stm32/boards/common_bss_heap_stack.ld
Damien George df3b466d6c stm32/boards: Factor out common data/bss/heap/stack linker sections.
Signed-off-by: Damien George <damien@micropython.org>
2020-10-29 23:31:59 +11:00

29 lines
525 B
Plaintext

/* This linker script fragment is intended to be included in SECTIONS. */
/* Zeroed-out data section */
.bss :
{
. = ALIGN(4);
_sbss = .;
*(.bss*)
*(COMMON)
. = ALIGN(4);
_ebss = .;
} >RAM
/* This is to define the start of the heap, and make sure there is a minimum size */
.heap :
{
. = ALIGN(4);
. = . + _minimum_heap_size;
. = ALIGN(4);
} >RAM
/* This checks there is enough RAM for the stack */
.stack :
{
. = ALIGN(4);
. = . + _minimum_stack_size;
. = ALIGN(4);
} >RAM