forked from embed-rs/stm32f7-discovery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstm32f7.ld
66 lines (53 loc) · 1.23 KB
/
stm32f7.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
MEMORY
{
FLASH(RX) : ORIGIN = 0x08000000, LENGTH = 1024K
RAM(WAIL) : ORIGIN = 0x20000000, LENGTH = 320K
}
ENTRY(reset)
__DATA_LOAD = LOADADDR(.data);
SECTIONS
{
.text : ALIGN(4)
{
/* stack pointer */
LONG(ORIGIN(RAM) + LENGTH(RAM))
/* reset entry point */
LONG(reset + 1)
KEEP(*(.rodata.EXCEPTIONS));
KEEP(*(.rodata.INTERRUPTS));
*(.text*)
} > FLASH
/* Constant data goes into FLASH */
.rodata :
{
*(.rodata .rodata*)
} >FLASH
.ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
.data : ALIGN(4)
{
__DATA_START = .;
*(.data*)
. = ALIGN(4);
__DATA_END = .;
} > RAM AT > FLASH
/* Uninitialized data section */
. = ALIGN(4);
.bss :
{
/* This is used by the startup in order to initialize the .bss secion */
__BSS_START = .; /* define a global symbol at bss start */
*(.bss)
*(.bss*)
*(COMMON)
. = ALIGN(4);
__BSS_END = .; /* define a global symbol at bss end */
} >RAM
/DISCARD/ :
{
*(.ARM.exidx*)
}
__HEAP_START = .;
. += 20K;
__HEAP_END = .;
__STACK_START = ORIGIN(RAM) + LENGTH(RAM);
}