1/******************************************************************************
2 *
3 * CME_M7.ld - Linker configuration file for project.
4 *
5 * Change Logs:
6 * Date           Author       Notes
7 * 2014-11-02     aozima       first implementation
8 *
9 *****************************************************************************/
10
11/* Program Entry, set to mark it as "used" and avoid gc */
12MEMORY
13{
14    FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 256K /* !!! real 128K, up to 256K for linker. */
15    SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
16}
17
18SECTIONS
19{
20    .text :
21    {
22        _text = .;
23        KEEP(*(.isr_vector))
24        *(.text*)
25        *(.rodata*)
26
27        /* section information for finsh shell */
28        . = ALIGN(4);
29        __fsymtab_start = .;
30        KEEP(*(FSymTab))
31        __fsymtab_end = .;
32        . = ALIGN(4);
33        __vsymtab_start = .;
34        KEEP(*(VSymTab))
35        __vsymtab_end = .;
36        . = ALIGN(4);
37
38        /* section information for components init. */
39        . = ALIGN(4);
40        __rt_init_start = .;
41        KEEP(*(SORT(.rti_fn*)))
42        __rt_init_end = .;
43        . = ALIGN(4);
44
45    } > FLASH
46
47    /* .ARM.exidx is sorted, so has to go in its own output section.  */
48    __exidx_start = .;
49    .ARM.exidx :
50    {
51        *(.ARM.exidx* .gnu.linkonce.armexidx.*)
52
53        /* This is used by the startup in order to initialize the .data secion */
54        _sidata = .;
55    } > FLASH
56    __exidx_end = .;
57
58	/* end of all text. */
59    _etext = .;
60
61    .data : AT(_etext)
62    {
63        _data = .;
64        *(vtable)
65        *(.data*)
66        _edata = .;
67    } > SRAM
68
69    .bss :
70    {
71        _bss = .;
72        *(.bss*)
73        *(COMMON)
74        _ebss = .;
75    } > SRAM
76    __bss_end = .;
77
78}
79