-
Notifications
You must be signed in to change notification settings - Fork 0
/
Linker.ld
69 lines (56 loc) · 1.22 KB
/
Linker.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
58
59
60
61
62
63
64
65
66
67
68
69
ENTRY(InterruptVectors)
MEMORY
{
flash (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
ccmram (rwx) : ORIGIN = 0x10000000, LENGTH = 64K
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
}
_estack = 0x10010000; /* highest stack address */
SECTIONS
{
/* .text and .rodata sections */
.text :
{
/* Mark start of text section */
_text = .;
/* Interrupt vectors */
__isr_vector_start = .;
KEEP(*(.isr_vector))
__isr_vector_end = .;
*(.text*)
*(.rodata*)
_etext = .;
_idata = .;
} > flash
/* .data section */
.data : AT(ADDR(.text) + SIZEOF(.text))
{
_data = .;
*(vtable)
*(.data*)
_edata = .;
} > ccmram
/*.bss section*/
.bss :
{
_bss = .;
*(.bss*)
*(COMMON)
_ebss = .;
} > ccmram
end = .;
/* Heap */
. = ALIGN(256);
_start_heap = .;
/* Stack */
/* defined by _estack at the top of script */
.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
/* Remove debug information from the standard libraries */
/DISCARD/ :
{
*(.note.GNU-stack)
libc.a ( * )
libgcc.a ( * )
libm.a ( * )
}
}