-
Notifications
You must be signed in to change notification settings - Fork 0
/
stm32f4_linker.ld
55 lines (46 loc) · 931 Bytes
/
stm32f4_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
ENTRY(Reset_Handler)
/*Memory section definition*/
MEMORY
{
RAM (rw) : ORIGIN = 0x20000000, LENGTH = 64K
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 256K
}
SECTIONS
{
.vector_table :
{
. = ALIGN(4);
KEEP(*(.vector_table))
. = ALIGN(4);
} >FLASH
.text :
{
. = ALIGN(4);
*(.text)
. = ALIGN(4);
} >FLASH
.rodata :
{
. = ALIGN(4);
*(.rodata)
. = ALIGN(4);
} >FLASH
.data :
{
. = ALIGN(4);
PROVIDE(_sdata = .) ;
*(.data)
PROVIDE(_edata = .);
. = ALIGN(4);
} >RAM AT> FLASH
PROVIDE(_sload_data = LOADADDR(.data)); /*This contains the load address of the .data section*/
PROVIDE(_StackStart = ORIGIN(RAM) + LENGTH(RAM) ); /*This contains the Stack_Start/RAM_End address */
.bss :
{
. = ALIGN(4);
_sbss = . ;
*(.bss)
_ebss = . ;
. = ALIGN(4);
} >RAM
}