-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcortex_m0.ld
More file actions
83 lines (69 loc) · 1.27 KB
/
cortex_m0.ld
File metadata and controls
83 lines (69 loc) · 1.27 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 6K
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 32K
}
stack_size = 1024;
_stack_start = ORIGIN(RAM) + LENGTH(RAM);
_stack_end = _stack_start - stack_size;
_heap_end = _stack_end;
ENTRY(init);
SECTIONS
{
.vector_table ORIGIN(FLASH) :
{
LONG(_stack_start)
KEEP(*(.reset))
KEEP(*(.exceptions))
} > FLASH
.text :
{
. = ALIGN(4);
*(.text)
*(.text*)
*(.rodata)
*(.rodata*)
. = ALIGN(4);
_etext = .;
} > FLASH
.ARM.extab : /* debug info */
{
*(.ARM.extab*)
} > FLASH
/* Used by startup to initialize data */
_sidata = .;
/* Initialized data section */
.data : AT (_sidata)
{
. = ALIGN(4);
_sdata = .; /* Create global symbol at start of data */
*(.data)
*(.data*)
. = ALIGN(4);
_edata = .;
} > RAM
/* Uninitialized data section */
. = ALIGN(4);
.bss :
{
/* Used by startup to initialize .bss section */
_sbss = .;
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(COMMON)
. = ALIGN(4);
_ebss = .; /* Define a global symbol at bss end */
__bss_end__ = _ebss;
} > RAM
. = ALIGN(4);
.heap :
{
_heap_start = .;
} > RAM
/DISCARD/ :
{
*(.ARM.exidx*)
*(.note.gnu.build-id*)
}
}