-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathldscript.ld
57 lines (47 loc) · 901 Bytes
/
ldscript.ld
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
ENTRY(Reset_Handler)
_flash_data_start = LOADADDR(.data);
_stack_end = ORIGIN(sram) + LENGTH(sram);
MEMORY {
flash (rx) : o = 0x08000000, l = 512k
sram (wx) : o = 0x20000000, l = 192k
shared (wx) : o = 0x20030000, l = 10k
}
SECTIONS {
.text : {
. = ALIGN(4);
KEEP(* (.vector_table))
* (.text*)
. = ALIGN(4);
} >flash
.rodata : {
. = ALIGN(4);
* (.rodata*)
. = ALIGN(4);
} >flash
.data : {
. = ALIGN(4);
_sram_data_start = .;
* (.data*)
. = ALIGN(4);
_sram_data_end = .;
} >sram AT>flash
.bss : {
. = ALIGN(4);
_bss_start = .;
* (.bss*)
* (COMMON)
. = ALIGN(4);
_bss_end = .;
} >sram
MAPPING_TABLE (NOLOAD) : {
* (MAPPING_TABLE)
} >shared
MB_MEM1 (NOLOAD) : {
* (MB_MEM1)
} >shared
MB_MEM2 (NOLOAD) : {
_MB_MEM2_start = .;
* (MB_MEM2);
_MB_MEM2_end = .;
} >shared
}