-
Notifications
You must be signed in to change notification settings - Fork 15
/
memory.lcf
116 lines (90 loc) · 2.12 KB
/
memory.lcf
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# SYSTEM memory regions indicate where external memory might be located.
# The TCF has no specific knowledge of whether SYSTEM regions contain
# external memory or not.
# CCMWRAP memory regions indicate unusable portions of the address space
# due to CCM memory wrapping into upper addresses beyond its size
MEMORY {
ICCM0 : ORIGIN = 0x00000000, LENGTH = 0x00010000
ICCM1 : ORIGIN = 0x10000000, LENGTH = 0x00050000
SYSTEM0 : ORIGIN = 0x20020800, LENGTH = 0x000E9AF0
DCCM : ORIGIN = 0x80000000, LENGTH = 0x00040000
XCCM : ORIGIN = 0x90000000, LENGTH = 0x00008000
YCCM : ORIGIN = 0xa0000000, LENGTH = 0x00008000
}
ENTRY(_arc_reset)
SECTIONS {
GROUP : {
.init_bootstrap:{
*(.init_vector)
*(.init_bootstrap)
}
.vector ALIGN(1024): {
_f_vector = .;
*(.vector)
_e_vector = .;
}
} > ICCM1
GROUP : {
.text ALIGN(4): {
_f_text = .;
*(TYPE text)
_e_text = .;
}
} > ICCM1
GROUP : {
.rodata ALIGN(4): {
_f_rodata = .;
_fctors = .;
*(.ctors*)
_ectors = .;
_fdtors = .;
*(.dtors*)
_edtors = .;
_feh_frame = .;
*(.eh_frame*)
_eeh_frame = .;
*(TYPE lit)
_e_rodata = .;
}
} > SYSTEM0
GROUP : {
.data ALIGN(8): {
_f_data = .;
_f_sdata = .;
*(.sdata)
_e_sdata = .;
*(TYPE data)
}
.tls ALIGN(8): {
*(.tls*)
_e_data = .;
}
_f_bss = .;
.bss ALIGN(16): {
*(TYPE bss)
}
.tensor_arena? ALIGN(16): {
}
_e_bss = .;
} > SYSTEM0
GROUP (NOLOAD) : {
.Zdata?: {}
} > DCCM
GROUP : {
.heap? ALIGN(8) SIZE(16384): {}
.stack ALIGN(8) SIZE(8192): {}
} >DCCM
GROUP BLOCK(4): {
.Xdata? : {}
} > XCCM
GROUP BLOCK(4): {
.Ydata? : {}
} > YCCM
_f_stack = ADDR(.stack);
_e_stack = ADDR(.stack) + SIZEOF(.stack);
_f_heap = ADDR(.heap);
_e_heap = ADDR(.heap) + SIZEOF(.heap);
_load_addr_text = LOADADDR(.text);
_load_addr_rodata = LOADADDR(.rodata);
_load_addr_data = LOADADDR(.data);
}