-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstm32.ld
59 lines (49 loc) · 1.22 KB
/
stm32.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
/*
MEMORY{
ROM (RX) : ORIGIN = 0, LENGTH = 64K
RAM (WRX) : ORIGIN = 0x20000000, LENGTH = 20K
RAMBB (WRX) : ORIGIN = 0x22000000, LENGTH = 640K
}
*/
SECTIONS
{
. = 0x0; /* From 0x00000000 */
.text :
{
*(vectors) /* Vector table */
*(.text.startup) /* startup code */
*(.text.exception) /* default exception handler */
*(.text.handler) /* default handler */
*(.text) /* Program code */
}
.rodata :
{
*(.rodata) /* Read only data */
}
. = ALIGN(0x400) ;
_FLASH_FREE = . ;
.user_data : AT(_FLASH_FREE)
{
*(user_data) /* user code in flash */
}
_DATA_ROM_START = .;
. = 0x20000000; /* From 0x20000000 */
_DATA_RAM_START = .;
.data : AT(_DATA_ROM_START)
{
*(.data) /* Data memory */
}
_DATA_RAM_END = .;
_BSS_START = .; /* Indicates where BSS section starts in RAM */
.bss :
{
*(.bss) /* Zero-filled run time allocate data memory */
}
_BSS_END = .; /* Indicates where BSS section ends in RAM */
. = ALIGN(0x10) ;
_TPA_START = . ;
.transient : AT(_TPA_START)
{
*(.transient) /* transient program in RAM*/
}
}