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