forked from embedded2014/rtenv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.ld
43 lines (34 loc) · 798 Bytes
/
main.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
ENTRY(main)
MEMORY
{
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 128K
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
}
SECTIONS
{
.text :
{
KEEP(*(.isr_vector))
*(.text)
*(.text.*)
*(.rodata)
*(.rodata*)
user_program_start = ALIGN(0x4);
KEEP(*(.user_program))
user_program_end = .;
_sidata = .;
} >FLASH
/* Initialized data will initially be loaded in FLASH at the end of the .text section. */
.data : AT (_sidata)
{
_sdata = .;
*(.data) /* Initialized data */
_edata = .;
} >RAM
.bss : {
_sbss = .;
*(.bss) /* Zero-filled run time allocate data memory */
_ebss = .;
} >RAM
_estack = ORIGIN(RAM) + LENGTH(RAM);
}