-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.ld
More file actions
49 lines (37 loc) · 869 Bytes
/
main.ld
File metadata and controls
49 lines (37 loc) · 869 Bytes
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
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm)
/* Could be used as part of --gc-sections Linker option */
ENTRY(Reset_Handler)
/* Memory configuration for LPC1114 */
MEMORY {
flash : ORIGIN = 0x00000000, LENGTH = 32k
ram : ORIGIN = 0x10000000, LENGTH = 4k
}
SECTIONS {
. = ORIGIN(flash);
.vectors : {
KEEP(*(.vectors))
} >flash
.text : {
. = ALIGN(4);
*(.text .text*)
*(.rodata .rodata*)
. = ALIGN(4);
} >flash
.data : {
__data_load = LOADADDR(.data);
__data_start = .;
*(.data .data*)
. = ALIGN(4);
__data_end = .;
} >ram AT >flash
.bss : {
__bss_start = .;
*(.bss .bss*)
. = ALIGN(4);
__bss_end = .;
} >ram
__ram_end = ORIGIN(ram) + LENGTH(ram);
}
_end = .;
PROVIDE(end = .);