-
Notifications
You must be signed in to change notification settings - Fork 2
/
gd32vf103xb.ld
69 lines (57 loc) · 1.07 KB
/
gd32vf103xb.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
67
68
69
OUTPUT_ARCH( "riscv" )
ENTRY( reset_handler )
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 128K
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 32K
}
SECTIONS
{
__stack_size = DEFINED(__stack_size) ? __stack_size : 1K;
.vector_table :
{
KEEP (*(SORT_NONE(.vector_table)))
} >FLASH
.text :
{
*(.rodata .rodata.*)
*(.srodata .srodata.*)
*(.text .text.*)
} >FLASH
. = ALIGN(4);
PROVIDE (__etext = .);
PROVIDE (_etext = .);
PROVIDE (etext = .);
_sidata = .;
.data : AT( _sidata )
{
_sdata = .;
*(.rdata)
*(.data .data.*)
*(.sdata .sdata.*)
. = ALIGN(4);
_edata = .;
} >RAM
PROVIDE( _edata = . );
PROVIDE( edata = . );
PROVIDE( _fbss = . );
PROVIDE( __bss_start = . );
.bss :
{
_sbss = .;
*(.sbss*)
*(.bss .bss.*)
*(COMMON)
. = ALIGN(4);
_ebss = .;
} >RAM
. = ALIGN(8);
PROVIDE( _end = . );
PROVIDE( end = . );
.stack ORIGIN(RAM) + LENGTH(RAM) - __stack_size :
{
PROVIDE( _heap_end = . );
. = __stack_size;
PROVIDE( _sp = . );
} >RAM
}