-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathrtl8762c.ld
100 lines (93 loc) · 2.69 KB
/
rtl8762c.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/* Entry Point */
ENTRY(Reset_Handler)
INPUT(mem_define.ld)
MEMORY
{
APP_DATA_ON (rwx) : ORIGIN = 0x00207C00, LENGTH = APP_GLOBAL_SIZE
HEAP_DATA_ON (rwx) : ORIGIN = (0x00207C00 + APP_GLOBAL_SIZE) , LENGTH = (65*1024) - APP_GLOBAL_SIZE
CACHE_DATA_ON (rwx) : ORIGIN = 0x0021C000, LENGTH = SHARE_CACHE_RAM_SIZE
APP_FLASH (r) : ORIGIN = APP_ADDR, LENGTH = APP_SIZE
UNINIT_RAM : ORIGIN = 0x00217f00, LENGTH = 256
}
/* Define output sections */
SECTIONS
{
. = APP_ADDR;
app.bin APP_ADDR :
{
KEEP(* (.app.flash.header))
KEEP(* (.app.flash.header.auth))
}AT > APP_FLASH
APP_FLASH_HEADER_EXT :
{
KEEP(* (.app.flash.header_ext))
}AT > APP_FLASH
FLASH_START_ADDR :
{
build/sdk/src/mcu/rtl876x/arm/startup_rtl8762c_gcc.o(RESET)
. = ALIGN(4);
__flash_start_load_ad__ = LOADADDR(FLASH_START_ADDR);
__flash_start_exe_ad__ = ADDR(FLASH_START_ADDR);
}AT > APP_FLASH
FLASH_TEXT :
{
*(.text*)
. = ALIGN(4);
*(.rodata*)
. = ALIGN(4);
*(.app.flash.text)
*(.app.flash.rodata)
}AT > APP_FLASH
RAM_VECTOR_TABLE 0x00200000:
{
__ram_vector_table_start__ = .;
KEEP(*(VECTOR))
__ram_vector_table_end__ = .;
}AT > APP_FLASH
__ram_vector_load_ad__ = LOADADDR(RAM_VECTOR_TABLE);
__ram_vector_table_length__ = __ram_vector_table_end__ - __ram_vector_table_start__;
RAM_DATA_ON :
{
. = ALIGN(4);
__ram_dataon_rw_start__ = .;
*(.data*)
* (.ram.dataon.data)
__ram_dataon_rw_end__ = .;
. = ALIGN(4);
} > APP_DATA_ON AT > APP_FLASH
BSS (NOLOAD):
{
. = ALIGN(4);
__ram_dataon_zi_start__ = .;
* (.ram.dataon.bss*)
*(.bss*)
*(COMMON)
. = ALIGN(4);
__ram_dataon_zi_end__ = .;
} > APP_DATA_ON AT > APP_FLASH
__ram_rw_load_ad__ = LOADADDR(RAM_DATA_ON);
__ram_dataon_rw_length__ = __ram_dataon_rw_end__ - __ram_dataon_rw_start__;
__ram_dataon_zi_length__ = __ram_dataon_zi_end__ - __ram_dataon_zi_start__;
DATA_RAM_UNIT :
{
* (.uninit.ram)
} > UNINIT_RAM AT > APP_FLASH
HEAP_DATA_ON :
{
__heap_start__ = .;
end = __heap_start__;
_end = end;
__end = end;
KEEP(*(.heap))
__heap_end__ = .;
__HeapLimit = __heap_end__;
} > HEAP_DATA_ON AT > APP_FLASH
CACHE_DATA_ON (OVERLAY):
{
__cache_dataon_start__ = . ;
*(.ram.sharecacheram.text)
__cache_dataon_end__ = .;
}>CACHE_DATA_ON AT> APP_FLASH
__cache_dataon_length__ = __cache_dataon_end__ - __cache_dataon_start__;
__cache_data_load_ad__ = LOADADDR(RAM_DATA_ON);
}