@@ -8,32 +8,23 @@ SEARCH_DIR(.)
8
8
9
9
STACK_SIZE = MBED_BOOT_STACK_SIZE;
10
10
11
- #define ROM_START 0x00000000
12
- #define ROM_SIZE 0x00040000
13
- #define RAM_START 0x20000000
14
- #define RAM_SIZE 0x00008000
15
- #define VECTORS 45 /* This value must match NVIC_NUM_VECTORS */
16
-
17
- #define VECTORS_SIZE (VECTORS * 4)
18
-
19
11
/* Memory Spaces Definitions */
20
12
MEMORY {
21
- rom (rx) : ORIGIN = ROM_START , LENGTH = ROM_SIZE
22
- ram (rwx) : ORIGIN = RAM_START + VECTORS_SIZE , LENGTH = RAM_SIZE - VECTORS_SIZE
23
- }
13
+ rom (rx) : ORIGIN = 0x00000000 , LENGTH = 0x00040000
14
+ ram (rwx) : ORIGIN = 0x20000000 + 0xB8 , LENGTH = 0x00008000 - 0xB8
15
+ }
24
16
25
- /* Section Definitions */
26
- SECTIONS {
27
- .text :
17
+ /* Section Definitions */
18
+ SECTIONS {
19
+ .text :
28
20
{
29
- __data_start__ = .;
30
- . = ALIGN (4);
21
+ . = ALIGN (8);
31
22
_sfixed = .;
32
- KEEP(*(.isr_vector))
33
23
KEEP(*(.vectors .vectors.*))
34
24
*(.text .text.* .gnu.linkonce.t.*)
35
25
*(.glue_7t) *(.glue_7)
36
26
*(.rodata .rodata* .gnu.linkonce.r.*)
27
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
37
28
38
29
/* Support C constructors, and C destructors in both user code
39
30
and the C library. This also provides support for C++ code. */
@@ -69,30 +60,21 @@ SECTIONS {
69
60
KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
70
61
KEEP (*(SORT(.dtors.*)))
71
62
KEEP (*crtend.o (.dtors))
72
- KEEP(*(.jcr*))
73
-
74
- KEEP(*(.eh_frame*))
75
63
76
64
. = ALIGN (8);
77
65
_efixed = .; /* End of text section */
78
66
} > rom
79
67
80
- .ARM.extab :
81
- {
82
- *(.ARM.extab* .gnu.linkonce.armextab.*)
83
- } > rom
84
-
85
68
/* .ARM.exidx is sorted, so has to go in its own output section. */
86
- __exidx_start = .;
87
- .ARM.exidx :
69
+ PROVIDE_HIDDEN ( __exidx_start = .) ;
70
+ .ARM.exidx :
88
71
{
89
72
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
90
73
} > rom
91
- __exidx_end = .;
74
+ PROVIDE_HIDDEN ( __exidx_end = .) ;
92
75
93
76
. = ALIGN (8);
94
77
_etext = .;
95
- __etext = .;
96
78
97
79
.relocate :
98
80
AT (_etext)
@@ -103,43 +85,42 @@ SECTIONS {
103
85
*(.data .data.*);
104
86
. = ALIGN (8);
105
87
_erelocate = .;
106
- __data_end__ = .;
107
88
} > ram
108
89
109
90
/* .bss section which is used for uninitialized data */
110
91
.bss (NOLOAD) :
111
92
{
112
- . = ALIGN (4);
113
- __bss_start__ = .;
93
+ . = ALIGN (8);
114
94
_sbss = . ;
115
95
_szero = .;
116
96
*(.bss .bss.*)
117
97
*(COMMON)
118
98
. = ALIGN (8);
119
99
_ebss = . ;
120
100
_ezero = .;
121
- __bss_end__ = .;
122
101
} > ram
123
102
124
- .heap (COPY) :
103
+ .heap (NOLOAD) :
125
104
{
126
- __end__ = .;
127
- PROVIDE (end = .);
128
- __HeapBase = .;
129
- *(.heap*)
105
+ . = ALIGN (8);
106
+ __end__ = . ;
130
107
. = ORIGIN (ram) + LENGTH (ram) - STACK_SIZE;
131
- __HeapLimit = .;
132
- __heap_limit = .; /* Add for _sbrk */
108
+ } > ram
109
+
110
+ /* stack section */
111
+ .stack (NOLOAD) :
112
+ {
113
+ . = ALIGN (8);
114
+ _sstack = .;
115
+ . = . + STACK_SIZE;
116
+ . = ALIGN (8);
117
+ _estack = .;
133
118
} > ram
134
119
135
120
/* Set stack top to end of RAM, and stack limit move down by
136
121
* size of stack_dummy section */
137
- __StackTop = ORIGIN (ram ) + LENGTH (ram );
122
+ __StackTop = ORIGIN (RAM ) + LENGTH (RAM );
138
123
__StackLimit = __StackTop - STACK_SIZE;
139
- PROVIDE (__stack = __StackTop);
140
-
141
- _sstack = __StackTop;
142
- _estack = __StackLimit;
143
124
144
125
. = ALIGN (8);
145
126
}
0 commit comments