-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathlink.ld
More file actions
51 lines (41 loc) · 762 Bytes
/
link.ld
File metadata and controls
51 lines (41 loc) · 762 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
50
51
OUTPUT_FORMAT("elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(Reset_Handler)
MEMORY
{
VECTOR (rx) : ORIGIN = 0x10000000, LENGTH = 0x400 /* 256k */
FLASH (rx) : ORIGIN = 0x10000400, LENGTH = 0xFFFBFF /*0xFFFFFF 256k */
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0xFFFF /* 32k */
}
STACK_SIZE = 8200;
SECTIONS
{
.interrupt_vector :
{
*(.cs3.interrupt_vector);
} > VECTOR
.code :
{
CREATE_OBJECT_SYMBOLS
*(.text .text.*);
} > FLASH
.data :
{
*(.rodata .rodata.*);
*(.data .data.*);
*(.bss .bss.*);
} > RAM
.bss : {
*(.bss .bss.*)
*(COMMON)
. = ALIGN(4);
} > FLASH
.stack : {
_stack_start_ = .;
KEEP(*(STACK))
. += STACK_SIZE;
. = ALIGN (4);
_stack_end_ = .;
} > RAM
STACK = _stack_start_;
}