-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlink.ld
More file actions
39 lines (31 loc) · 723 Bytes
/
link.ld
File metadata and controls
39 lines (31 loc) · 723 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
MEMORY
{
FLASH : ORIGIN = 0x08000000, LENGTH = 256K
RAM : ORIGIN = 0x20000000, LENGTH = 64K
}
ENTRY(main);
SECTIONS
{
PROVIDE(_stack_start = ORIGIN(RAM) + LENGTH(RAM));
.vector_table ORIGIN(FLASH) :
{
/* Initial Stack Pointer (SP) value */
LONG(_stack_start);
/* Reset vector */
KEEP(*(.vector_table.reset_vector));
__reset_vector = .;
/* Exceptions */
KEEP(*(.vector_table.exceptions));
__eexceptions = .;
/* Device specific interrupts */
KEEP(*(.vector_table.interrupts));
} > FLASH
PROVIDE(_stext = ADDR(.vector_table) + SIZEOF(.vector_table));
/* ### .text */
.text _stext :
{
*(.text .text.*);
. = ALIGN(4);
__etext = .;
} > FLASH
}