aboutsummaryrefslogtreecommitdiff
path: root/ports/nrf/boards/microbit/custom_nrf51822_s110_microbit.ld
blob: 71d57aeb02725b0f7b4b504470d36888cf22327a (plain)
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
/*
    GNU linker script for NRF51822 AA w/ S110 8.0.0 SoftDevice
*/
/* Specify the memory areas */
SEARCH_DIR(.)
GROUP(-lgcc -lc -lnosys)
MEMORY
{
    FLASH (rx)      : ORIGIN = 0x00000000, LENGTH = 256K /* entire flash */
    FLASH_TEXT (rx) : ORIGIN = 0x00018000, LENGTH = 148K /* app */
    FLASH_USER (rx) : ORIGIN = 0x0003D000, LENGTH = 12K  /* app data, filesystem */
    RAM (xrw)       : ORIGIN = 0x20002000, LENGTH = 8K   /* app RAM */
}

/* produce a link error if there is not this amount of RAM for these sections */
_minimum_stack_size = 2K;
_minimum_heap_size = 1K;

/* top end of the stack */

/*_stack_end = ORIGIN(RAM) + LENGTH(RAM);*/
_estack = ORIGIN(RAM) + LENGTH(RAM);

/* RAM extents for the garbage collector */
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
_heap_end = 0x20003c00; /* tunable */

INCLUDE "boards/common.ld"