1
|
/* Memory Definitions */
|
2
|
|
3
|
MEMORY
|
4
|
{
|
5
|
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00004000
|
6
|
DATA (rw) : ORIGIN = 0x00200000, LENGTH = 0x00010000
|
7
|
STACK (rw) : ORIGIN = 0x00210000, LENGTH = 0x00000000
|
8
|
}
|
9
|
|
10
|
|
11
|
/* Section Definitions */
|
12
|
|
13
|
SECTIONS
|
14
|
{
|
15
|
. = 0x00000000;
|
16
|
/* first section is .text which is used for code */
|
17
|
.text 0x00000000: AT ( 0x00000000 ) {
|
18
|
* (.reset)
|
19
|
* (.text)
|
20
|
* (.rodata*)
|
21
|
/* * (.dfu.functab) */ /* for debugging */
|
22
|
. = ALIGN(4);
|
23
|
} >FLASH
|
24
|
|
25
|
_etext = . ;
|
26
|
PROVIDE (etext = .);
|
27
|
|
28
|
.data.shared (0x00200020): AT (LOADADDR(.text) + SIZEOF(.text)) {
|
29
|
_data_shared = . ;
|
30
|
* (.data.shared)
|
31
|
. = ALIGN(4);
|
32
|
} >DATA
|
33
|
|
34
|
_edata_shared = . ;
|
35
|
_data_flash = LOADADDR(.data.shared) + SIZEOF(.data.shared);
|
36
|
|
37
|
/* 0x00200000 ... */
|
38
|
.data (0x00200000 + SIZEOF(.text)): AT ( LOADADDR(.text) + SIZEOF(.text) + SIZEOF(.data.shared)) {
|
39
|
_data = . ;
|
40
|
* (.vectram)
|
41
|
* (.data)
|
42
|
. = ALIGN(4);
|
43
|
} >DATA
|
44
|
|
45
|
_edata = . ;
|
46
|
PROVIDE (edata = .);
|
47
|
|
48
|
/* dfu.functab addresses are valid as long as DFU is in flash, i.e.
|
49
|
* only while application calls those functions. Once executing in
|
50
|
* DFU mode, we are re-located to ram */
|
51
|
.dfu.functab 0x00003fd0: AT ( ADDR(.dfu.functab) - ADDR(.text) ) {
|
52
|
*(.dfu.functab)
|
53
|
. = ALIGN(4096);
|
54
|
} >FLASH
|
55
|
|
56
|
|
57
|
/* .bss section which is used for uninitialized data */
|
58
|
.bss : {
|
59
|
__bss_start = . ;
|
60
|
__bss_start__ = . ;
|
61
|
*(.bss)
|
62
|
*(COMMON)
|
63
|
} >DATA
|
64
|
|
65
|
. = ALIGN(4);
|
66
|
__bss_end__ = . ;
|
67
|
__bss_end__ = . ;
|
68
|
|
69
|
PROVIDE (main = .);
|
70
|
|
71
|
_end = . ;
|
72
|
|
73
|
. = ALIGN(4);
|
74
|
.int_data : {
|
75
|
*(.internal_ram_top)
|
76
|
} >STACK
|
77
|
|
78
|
PROVIDE (end = .);
|
79
|
|
80
|
/* Stabs debugging sections. */
|
81
|
.stab 0 : { *(.stab) }
|
82
|
.stabstr 0 : { *(.stabstr) }
|
83
|
.stab.excl 0 : { *(.stab.excl) }
|
84
|
.stab.exclstr 0 : { *(.stab.exclstr) }
|
85
|
.stab.index 0 : { *(.stab.index) }
|
86
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
87
|
.comment 0 : { *(.comment) }
|
88
|
/* DWARF debug sections.
|
89
|
Symbols in the DWARF debugging sections are relative to the beginning
|
90
|
of the section so we begin them at 0. */
|
91
|
/* DWARF 1 */
|
92
|
.debug 0 : { *(.debug) }
|
93
|
.line 0 : { *(.line) }
|
94
|
/* GNU DWARF 1 extensions */
|
95
|
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
96
|
.debug_sfnames 0 : { *(.debug_sfnames) }
|
97
|
/* DWARF 1.1 and DWARF 2 */
|
98
|
.debug_aranges 0 : { *(.debug_aranges) }
|
99
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
100
|
/* DWARF 2 */
|
101
|
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
102
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
103
|
.debug_line 0 : { *(.debug_line) }
|
104
|
.debug_frame 0 : { *(.debug_frame) }
|
105
|
.debug_str 0 : { *(.debug_str) }
|
106
|
.debug_loc 0 : { *(.debug_loc) }
|
107
|
.debug_macinfo 0 : { *(.debug_macinfo) }
|
108
|
/* SGI/MIPS DWARF 2 extensions */
|
109
|
.debug_weaknames 0 : { *(.debug_weaknames) }
|
110
|
.debug_funcnames 0 : { *(.debug_funcnames) }
|
111
|
.debug_typenames 0 : { *(.debug_typenames) }
|
112
|
.debug_varnames 0 : { *(.debug_varnames) }
|
113
|
|
114
|
}
|