forked from embedded2015/freertos-basic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.ld
More file actions
68 lines (62 loc) · 1.6 KB
/
main.ld
File metadata and controls
68 lines (62 loc) · 1.6 KB
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
67
68
ENTRY(main)
MEMORY
{
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 128K
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 80K
}
SECTIONS
{
.isr_vector :
{
. = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(4);
} >FLASH
.text :
{
. = ALIGN(4);
*(.text)
*(.text.*)
. = ALIGN(4);
} >FLASH
/* Constant data goes into FLASH */
.rodata :
{
. = ALIGN(4);
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
. = ALIGN(4);
_sromfs = .;
*(.rom*)
_eromfs = .;
. = ALIGN(4);
} >FLASH
/* Initialized data will initially be loaded in FLASH at the end of the .text section. */
_sidata = LOADADDR(.data);
.data :
{
_sdata = .;
*(.init_array)
*(.data) /* Initialized data */
*(.data.*) /* Initialized data */
_edata = .;
} >RAM AT >FLASH
.bss(NOLOAD) : {
_sbss = .;
__bss_start__ = .;
*(.bss) /* Zero-filled run time allocate data memory */
*(.bss.*) /* Zero-filled run time allocate data memory */
_ebss = .;
__bss_end__ = .;
end = .; /* For checking stack-heap collision detection from sbrk() */
} >RAM AT >RAM
/* Remove information from the standard libraries */
/DISCARD/ :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
libnosys.a ( * )
}
_estack = ORIGIN(RAM) + LENGTH(RAM);
}