-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinker.ld
63 lines (53 loc) · 1.01 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
/* Entry Point */
ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
_estack = 0x20020000; /* end of RAM */
/* Specify the memory areas */
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K
RAM (rw) : ORIGIN = 0x20000000, LENGTH = 128K
}
SECTIONS
{
.isr_vector :
{
KEEP(*(.isr_vector))
} >FLASH
.text :
{
*(.text)
} >FLASH
.rodata :
{
*(.rodata)
} >FLASH
_sidata = LOADADDR(.data);
.data :
{
_sdata = .;
*(.data)
_edata = .;
} >RAM AT> FLASH
.bss :
{
_sbss = .;
*(.bss)
_ebss = .;
} >RAM
.osstack :
{
/* 1 KB for OS stack */
. = ALIGN(8);
_start_os_stack = .;
. = . + 1024;
_end_os_stack = .;
} >RAM
.osheap :
{
/* 50k for OS heap */
_start_os_heap = .;
. = . + 50K;
_end_os_heap = .;
} >RAM
}