xref: /btstack/port/apollo2-em9304/example-template/gcc/btstack_template.ld (revision e6c9673776c7f85e24c76da7f4b1b83031102d2b)
1/******************************************************************************
2 *
3 * hello_world_uart.ld - Linker script for applications using startup_gnu.c
4 *
5 *****************************************************************************/
6ENTRY(am_reset_isr)
7
8MEMORY
9{
10    FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 1024K
11    SRAM (rwx) : ORIGIN = 0x10000000, LENGTH = 256K
12}
13
14SECTIONS
15{
16    .text :
17    {
18        . = ALIGN(4);
19        KEEP(*(.isr_vector))
20        *(.text)
21        *(.text*)
22        *(.rodata)
23        *(.rodata*)
24        . = ALIGN(4);
25        _etext = .;
26    } > FLASH
27
28  /* User stack section initialized by startup code. */
29  .stack (NOLOAD):
30    {
31        . = ALIGN(8);
32        *(.stack)
33        *(.stack*)
34        . = ALIGN(8);
35    } > SRAM
36
37    .data :
38    {
39        . = ALIGN(4);
40        _sdata = .;
41        *(.data)
42        *(.data*)
43        . = ALIGN(4);
44        _edata = .;
45    } > SRAM AT>FLASH
46
47    /* used by startup to initialize data */
48    _init_data = LOADADDR(.data);
49
50    .bss :
51    {
52        . = ALIGN(4);
53        _sbss = .;
54        *(.bss)
55        *(.bss*)
56        *(COMMON)
57        . = ALIGN(4);
58        _ebss = .;
59    } > SRAM
60
61  .ARM.attributes 0 : { *(.ARM.attributes) }
62}
63
64
65