summaryrefslogtreecommitdiffstatshomepage
path: root/ports/stm32/boards/common_bss_heap_stack.ld
blob: b079313c444b98a6c244b848ec2944af83df025b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* 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

/* _bl_state symbol is used by MICROPY_HW_ENTER_BOOTLOADER_VIA_RESET, this is
   the end of stack address but is accessed as a different type. */
_bl_state = _estack;