1
2
3ENTRY(Reset_Handler)
4
5INCLUDE "script/export-rom_symbol_v01.txt"
6
7GROUP (
8  libgcc.a
9  libc.a
10  libg.a
11  libm.a
12  libnosys.a
13)
14
15MEMORY
16{
17	ROM (rx) : 			ORIGIN = 0x00000000, LENGTH = 0x80000	/* ROM: 512k */
18	ROMBSS_RAM (rw)  : 		ORIGIN = 0x10000000, LENGTH = 0x2000	/* ROM BSS RAM: 8K */
19	BOOTLOADER_RAM (rwx)  : 	ORIGIN = 0x10002000, LENGTH = 0x3000	/* BOOT Loader RAM: 12K */
20	BD_RAM (rwx)  : 		ORIGIN = 0x10005000, LENGTH = 0x38000	/* MAIN RAM: 228 */
21	ROM_BSS_RAM (rwx)  : 		ORIGIN = 0x1003D000, LENGTH = 0x1000	/* ROM BSS RAM: 4K */
22	MSP_RAM (wx)  : 		ORIGIN = 0x1003E000, LENGTH = 0x1000	/* MSP RAM: 4k */
23	RDP_RAM (wx)  : 		ORIGIN = 0x1003F000, LENGTH = 0xFF0	/* RDP RAM: 4k-0x10 */
24
25	XIPBOOT (rx)  :			ORIGIN = 0x08000000+0x20, LENGTH = 0x04000-0x20	/* XIPBOOT: 32k, 32 Bytes resvd for header*/
26	XIPSYS (r) :			ORIGIN = 0x08009000, LENGTH = 0x1000	/* XIPSYS: 4K system data in flash */
27	XIPCAL (r) :			ORIGIN = 0x0800A000, LENGTH = 0x1000	/* XIPCAL: 4K calibration data in flash */
28	XIP1 (rx)  : 			ORIGIN = 0x08019000+0x20, LENGTH = 0xE2000-0x20	/* XIP1: 904k, 32 Bytes resvd for header */
29}
30
31PROVIDE(app_download_addr = 0xffffffff);
32PROVIDE(kernel_download_addr = 0x8100000);
33
34SECTIONS
35{
36	.rom.text : { } > ROM
37	.rom.rodata : { } > ROM
38	.ARM.exidx :
39	{
40		__exidx_start = .;
41	    *(.ARM.exidx*)
42	    *(.gnu.linkonce.armexidx.*)
43		__exidx_end = .;
44	} > ROM
45	.hal.rom.bss : { } > ROMBSS_RAM
46
47	/* image1 entry, this section should in RAM and fixed address for ROM */
48	.ram_image1.entry :
49	{
50		__ram_image1_text_start__ = .;
51		__ram_start_table_start__ = .;
52		KEEP(*(SORT(.image1.entry.data*)))
53		__ram_start_table_end__ = .;
54
55		__image1_validate_code__ = .;
56		KEEP(*(.image1.validate.rodata*))
57		KEEP(*(.image1.export.symb*))
58	} > BOOTLOADER_RAM
59
60	/*  Add . to assign the start address of the section */
61	/*  to prevent the change of the start address by ld doing section alignment */
62	.ram_image1.text . :
63	{
64		/* image1 text */
65		*(.boot.ram.text*)
66		*(.boot.rodata*)
67	} > BOOTLOADER_RAM
68
69	.ram_image1.data . :
70	{
71		__ram_image1_data_start__ = .;
72		KEEP(*(.boot.ram.data*))
73		__ram_image1_data_end__ = .;
74
75		__ram_image1_text_end__ = .;
76	} > BOOTLOADER_RAM
77
78	.ram_image1.bss . :
79	{
80		__image1_bss_start__ = .;
81		KEEP(*(.boot.ram.bss*))
82		KEEP(*(.boot.ram.end.bss*))
83		__image1_bss_end__ = .;
84	} > BOOTLOADER_RAM
85
86	.ram_image2.entry :
87	{
88		__ram_image2_text_start__ = .;
89		__image2_entry_func__ = .;
90		KEEP(*(SORT(.image2.entry.data*)))
91
92		__image2_validate_code__ = .;
93		KEEP(*(.image2.validate.rodata*))
94
95	} > BD_RAM
96
97	.ram_image2.text :
98	{
99	  KEEP(*(.image2.ram.text*))
100	} > BD_RAM
101
102	.ram_image2.data :
103	{
104		__data_start__ = .;
105		*(.data*)
106		__data_end__ = .;
107		__ram_image2_text_end__ = .;
108		. = ALIGN(16);
109	} > BD_RAM
110
111	.ram_image2.bss :
112	{
113		__bss_start__ = .;
114		*(.bss*)
115		*(COMMON)
116	} > BD_RAM
117
118	.ram_image2.skb.bss :
119	{
120		*(.bdsram.data*)
121		__bss_end__ = .;
122	} > BD_RAM
123
124	.ram_heap.data :
125	{
126		*(.bfsram.data*)
127	} > BD_RAM
128
129	. = ALIGN(8);
130	PROVIDE(heap_start    	  = .);
131	PROVIDE(heap_end    	  = 0x1003CFFF);
132	PROVIDE(heap_len    	  = heap_end - heap_start);
133
134	.rom.bss :
135	{
136		*(.heap.stdlib*)
137	} > ROM_BSS_RAM
138
139	.ram_rdp.text :
140	{
141		__rom_top_4k_start_ = .;
142		__rdp_text_start__ = .;
143		KEEP(*(.rdp.ram.text*))
144		KEEP(*(.rdp.ram.data*))
145		__rdp_text_end__ = .;
146		. = ALIGN(16);
147
148	} > RDP_RAM
149
150	.xip_image1.text :
151	{
152		__flash_boot_text_start__ = .;
153
154		*(.flashboot.text*)
155
156		__flash_boot_text_end__ = .;
157
158		. = ALIGN(16);
159	} > XIPBOOT
160
161	.xip_image2.text :
162	{
163		__flash_text_start__ = .;
164
165		*(.img2_custom_signature*)
166		*(.text)
167		*(.text*)
168		*(.rodata)
169		*(.rodata*)
170		*(.debug_trace*)
171
172		__flash_text_end__ = .;
173
174		. = ALIGN (16);
175	} > XIP1
176}
177
178SECTIONS
179{
180	/* Bootloader symbol list */
181  boot_export_symbol = 0x10002020;
182}
183