1MEMORY
2{
3  ram (rw) : o = 0x0000400, l = 31k
4  rom (rx) : o = 0x00A0000, l = 384k
5  nrom(rx) : o = 0x0000F000, l = 4k
6  xram(rw) : o = 0x00028000, l = 4k
7}
8
9_system_stack_size = 0x800;
10
11SECTIONS
12{
13	/* Variable Vector Section */
14	.var_vects 0x000FA000 :
15	{
16		KEEP(*( .var_vects))
17	} > rom
18
19	.text 0x000DD000 :
20	{
21		*(.text)
22		*(.text.*)
23
24		/* section information for finsh shell */
25		. = ALIGN(4);
26		___fsymtab_start = .;
27		KEEP(*(FSymTab))
28		___fsymtab_end = .;
29		. = ALIGN(4);
30		___vsymtab_start = .;
31		KEEP(*(VSymTab))
32		___vsymtab_end = .;
33		. = ALIGN(4);
34
35		etext = .;
36	} > rom
37
38	.rodata :
39	{
40		_rodata = .;
41		*(.rodata)
42		*(.rodata.*)
43		*(.frodata)
44		_erodata = .;
45	} > rom
46
47	.init :
48	{
49		*(.init)
50	} > rom
51
52	.fini :
53	{
54		*(.fini)
55	} > rom
56
57	.got :
58	{
59		*(.got)
60		*(.got.plt)
61	} > rom
62
63	.eh_frame_hdr :
64	{
65		*(.eh_frame_hdr)
66	} > rom
67
68	.eh_frame :
69	{
70		*(.eh_frame)
71	} > rom
72
73	.jcr :
74	{
75		*(.jcr)
76	} > rom
77
78	.tors :
79	{
80		__CTOR_LIST__ = .;
81		___ctors = .;
82		*(.ctors)
83		___ctors_end = .;
84		__CTOR_END__ = .;
85		__DTOR_LIST__ = .;
86		___dtors = .;
87		*(.dtors)
88		___dtors_end = .;
89		__DTOR_END__ = .;
90		_mdata = .;
91	} > rom
92
93	.data 0x00000400 : AT (_mdata)
94	{
95		_data = .;
96		*(.data)
97		*(.data.*)
98		*(.ndata)
99		*(.ndata.*)
100		*(.plt)
101		_edata = .;
102	} > ram
103
104	.bss :
105	{
106		_bss = .;
107		*(.bss)
108		*(COMMON)
109		*(.nbss)
110		_ebss = .;
111		_end = .;
112	} > ram
113
114	.gcc_exc :
115	{
116		*(.gcc_exc)
117	} > ram
118
119	/* User Stack Pointer */
120/*
121	.ustack 0x00003000 :
122	{
123		_ustack = .;
124	} > ram
125*/
126
127	/* Interrupt Stack Pointer */
128	.istack :
129	{
130		. = . + _system_stack_size;
131		. = ALIGN(4);
132		_istack = .;
133	} > ram
134
135        . = ALIGN(4);
136	_user_ram_end = .;
137
138	.nrodata 0x0000F000 :
139	{
140		_nrodata = .;
141		*(.nrodata)
142		*(.nrodata.*)
143		_enrodata = .;
144	} > nrom
145
146	.fdata 0x00028000 : AT (_mdata + SIZEOF(.data))
147	{
148		_fdata = .;
149		*(.fdata)
150		*(.fdata.*)
151		_efdata = .;
152	} > xram
153	.fbss :
154	{
155		_fbss = .;
156		*(.fbss)
157		*(.fbss.*)
158		_efbss = .;
159	} > xram
160
161	/* Fixed Vector Section */
162	.vects 0x000FFFDC :
163	{
164		KEEP(*( .vects))
165	} > rom
166
167}