root/webserver/example/Crossworks_taskinglib/ARM RAM Debug/CrossWorks_TaskingLib_Test.ld

Revision 13, 8.3 kB (checked in by phil, 15 years ago)

Crossworks Lib Example (multiple tasks)

Line 
1 MEMORY
2 {
3   UNPLACED_SECTIONS (wx) : ORIGIN = 0x100000000, LENGTH = 0
4   AHB_Peripherals (wx) : ORIGIN = 0xffe00000, LENGTH = 0x00200000
5   Battery_RAM (wx) : ORIGIN = 0xe0084000, LENGTH = 0x00000800
6   APB_Peripherals (wx) : ORIGIN = 0xe0000000, LENGTH = 0x00200000
7   USB_RAM (wx) : ORIGIN = 0x7fd00000, LENGTH = 0x00002000
8   Ethernet_RAM (wx) : ORIGIN = 0x7fe00000, LENGTH = 0x00004000
9   SRAM (wx) : ORIGIN = 0x40000000, LENGTH = 0x00008000
10   FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00080000
11 }
12
13
14 SECTIONS
15 {
16   __AHB_Peripherals_segment_start__ = 0xffe00000;
17   __AHB_Peripherals_segment_end__ = 0x00000000;
18   __Battery_RAM_segment_start__ = 0xe0084000;
19   __Battery_RAM_segment_end__ = 0xe0084800;
20   __APB_Peripherals_segment_start__ = 0xe0000000;
21   __APB_Peripherals_segment_end__ = 0xe0200000;
22   __USB_RAM_segment_start__ = 0x7fd00000;
23   __USB_RAM_segment_end__ = 0x7fd02000;
24   __Ethernet_RAM_segment_start__ = 0x7fe00000;
25   __Ethernet_RAM_segment_end__ = 0x7fe04000;
26   __SRAM_segment_start__ = 0x40000000;
27   __SRAM_segment_end__ = 0x40008000;
28   __FLASH_segment_start__ = 0x00000000;
29   __FLASH_segment_end__ = 0x00080000;
30
31   __STACKSIZE__ = 1024;
32   __STACKSIZE_IRQ__ = 256;
33   __STACKSIZE_FIQ__ = 256;
34   __STACKSIZE_SVC__ = 0;
35   __STACKSIZE_ABT__ = 0;
36   __STACKSIZE_UND__ = 0;
37   __HEAPSIZE__ = 1024;
38
39   __vectors_load_start__ = __SRAM_segment_start__;
40   .vectors __SRAM_segment_start__ :
41   {
42     __vectors_start__ = .;
43     *(.vectors .vectors.*)
44   }
45   __vectors_end__ = __vectors_start__ + SIZEOF(.vectors);
46
47   . = ASSERT(__vectors_end__ >= __SRAM_segment_start__ && __vectors_end__ <= (__SRAM_segment_start__ + 0x00008000) , "error: .vectors is too large to fit in SRAM memory segment");
48
49   __fast_load_start__ = ALIGN(__vectors_end__ , 4);
50   .fast ALIGN(__vectors_end__ , 4) :
51   {
52     __fast_start__ = .;
53     *(.fast .fast.*)
54   }
55   __fast_end__ = __fast_start__ + SIZEOF(.fast);
56
57   . = ASSERT(__fast_end__ >= __SRAM_segment_start__ && __fast_end__ <= (__SRAM_segment_start__ + 0x00008000) , "error: .fast is too large to fit in SRAM memory segment");
58
59   __init_load_start__ = ALIGN(__fast_end__ , 4);
60   .init ALIGN(__fast_end__ , 4) :
61   {
62     __init_start__ = .;
63     *(.init .init.*)
64   }
65   __init_end__ = __init_start__ + SIZEOF(.init);
66
67   . = ASSERT(__init_end__ >= __SRAM_segment_start__ && __init_end__ <= (__SRAM_segment_start__ + 0x00008000) , "error: .init is too large to fit in SRAM memory segment");
68
69   __text_load_start__ = ALIGN(__init_end__ , 4);
70   .text ALIGN(__init_end__ , 4) :
71   {
72     __text_start__ = .;
73     *(.text .text.* .glue_7t .glue_7 .gnu.linkonce.t.* .gcc_except_table)
74   }
75   __text_end__ = __text_start__ + SIZEOF(.text);
76
77   . = ASSERT(__text_end__ >= __SRAM_segment_start__ && __text_end__ <= (__SRAM_segment_start__ + 0x00008000) , "error: .text is too large to fit in SRAM memory segment");
78
79   __dtors_load_start__ = ALIGN(__text_end__ , 4);
80   .dtors ALIGN(__text_end__ , 4) :
81   {
82     __dtors_start__ = .;
83     KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors))
84   }
85   __dtors_end__ = __dtors_start__ + SIZEOF(.dtors);
86
87   . = ASSERT(__dtors_end__ >= __SRAM_segment_start__ && __dtors_end__ <= (__SRAM_segment_start__ + 0x00008000) , "error: .dtors is too large to fit in SRAM memory segment");
88
89   __ctors_load_start__ = ALIGN(__dtors_end__ , 4);
90   .ctors ALIGN(__dtors_end__ , 4) :
91   {
92     __ctors_start__ = .;
93     KEEP (*(SORT(.ctors.*))) KEEP (*(.ctors))
94   }
95   __ctors_end__ = __ctors_start__ + SIZEOF(.ctors);
96
97   . = ASSERT(__ctors_end__ >= __SRAM_segment_start__ && __ctors_end__ <= (__SRAM_segment_start__ + 0x00008000) , "error: .ctors is too large to fit in SRAM memory segment");
98
99   __data_load_start__ = ALIGN(__ctors_end__ , 4);
100   .data ALIGN(__ctors_end__ , 4) :
101   {
102     __data_start__ = .;
103     *(.data .data.* .gnu.linkonce.d.*)
104   }
105   __data_end__ = __data_start__ + SIZEOF(.data);
106
107   . = ASSERT(__data_end__ >= __SRAM_segment_start__ && __data_end__ <= (__SRAM_segment_start__ + 0x00008000) , "error: .data is too large to fit in SRAM memory segment");
108
109   __rodata_load_start__ = ALIGN(__data_end__ , 4);
110   .rodata ALIGN(__data_end__ , 4) :
111   {
112     __rodata_start__ = .;
113     *(.rodata .rodata.* .gnu.linkonce.r.*)
114   }
115   __rodata_end__ = __rodata_start__ + SIZEOF(.rodata);
116
117   . = ASSERT(__rodata_end__ >= __SRAM_segment_start__ && __rodata_end__ <= (__SRAM_segment_start__ + 0x00008000) , "error: .rodata is too large to fit in SRAM memory segment");
118
119   __bss_load_start__ = ALIGN(__rodata_end__ , 4);
120   .bss ALIGN(__rodata_end__ , 4) (NOLOAD) :
121   {
122     __bss_start__ = .;
123     *(.bss .bss.* .gnu.linkonce.b.*) *(COMMON)
124   }
125   __bss_end__ = __bss_start__ + SIZEOF(.bss);
126
127   . = ASSERT(__bss_end__ >= __SRAM_segment_start__ && __bss_end__ <= (__SRAM_segment_start__ + 0x00008000) , "error: .bss is too large to fit in SRAM memory segment");
128
129   __non_init_load_start__ = ALIGN(__bss_end__ , 4);
130   .non_init ALIGN(__bss_end__ , 4) (NOLOAD) :
131   {
132     __non_init_start__ = .;
133     *(.non_init .non_init.*)
134   }
135   __non_init_end__ = __non_init_start__ + SIZEOF(.non_init);
136
137   . = ASSERT(__non_init_end__ >= __SRAM_segment_start__ && __non_init_end__ <= (__SRAM_segment_start__ + 0x00008000) , "error: .non_init is too large to fit in SRAM memory segment");
138
139   __heap_load_start__ = ALIGN(__non_init_end__ , 4);
140   .heap ALIGN(__non_init_end__ , 4) (NOLOAD) :
141   {
142     __heap_start__ = .;
143     *(.heap)
144     . = ALIGN(MAX(__heap_start__ + __HEAPSIZE__ , .), 4);
145   }
146   __heap_end__ = __heap_start__ + SIZEOF(.heap);
147
148   . = ASSERT(__heap_end__ >= __SRAM_segment_start__ && __heap_end__ <= (__SRAM_segment_start__ + 0x00008000) , "error: .heap is too large to fit in SRAM memory segment");
149
150   __stack_load_start__ = ALIGN(__heap_end__ , 4);
151   .stack ALIGN(__heap_end__ , 4) (NOLOAD) :
152   {
153     __stack_start__ = .;
154     *(.stack)
155     . = ALIGN(MAX(__stack_start__ + __STACKSIZE__ , .), 4);
156   }
157   __stack_end__ = __stack_start__ + SIZEOF(.stack);
158
159   . = ASSERT(__stack_end__ >= __SRAM_segment_start__ && __stack_end__ <= (__SRAM_segment_start__ + 0x00008000) , "error: .stack is too large to fit in SRAM memory segment");
160
161   __stack_irq_load_start__ = ALIGN(__stack_end__ , 4);
162   .stack_irq ALIGN(__stack_end__ , 4) (NOLOAD) :
163   {
164     __stack_irq_start__ = .;
165     *(.stack_irq)
166     . = ALIGN(MAX(__stack_irq_start__ + __STACKSIZE_IRQ__ , .), 4);
167   }
168   __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
169
170   . = ASSERT(__stack_irq_end__ >= __SRAM_segment_start__ && __stack_irq_end__ <= (__SRAM_segment_start__ + 0x00008000) , "error: .stack_irq is too large to fit in SRAM memory segment");
171
172   __stack_fiq_load_start__ = ALIGN(__stack_irq_end__ , 4);
173   .stack_fiq ALIGN(__stack_irq_end__ , 4) (NOLOAD) :
174   {
175     __stack_fiq_start__ = .;
176     *(.stack_fiq)
177     . = ALIGN(MAX(__stack_fiq_start__ + __STACKSIZE_FIQ__ , .), 4);
178   }
179   __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
180
181   . = ASSERT(__stack_fiq_end__ >= __SRAM_segment_start__ && __stack_fiq_end__ <= (__SRAM_segment_start__ + 0x00008000) , "error: .stack_fiq is too large to fit in SRAM memory segment");
182
183   __stack_svc_load_start__ = ALIGN(__stack_fiq_end__ , 4);
184   .stack_svc ALIGN(__stack_fiq_end__ , 4) (NOLOAD) :
185   {
186     __stack_svc_start__ = .;
187     *(.stack_svc)
188     . = ALIGN(MAX(__stack_svc_start__ + __STACKSIZE_SVC__ , .), 4);
189   }
190   __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
191
192   . = ASSERT(__stack_svc_end__ >= __SRAM_segment_start__ && __stack_svc_end__ <= (__SRAM_segment_start__ + 0x00008000) , "error: .stack_svc is too large to fit in SRAM memory segment");
193
194   __stack_abt_load_start__ = ALIGN(__stack_svc_end__ , 4);
195   .stack_abt ALIGN(__stack_svc_end__ , 4) (NOLOAD) :
196   {
197     __stack_abt_start__ = .;
198     *(.stack_abt)
199     . = ALIGN(MAX(__stack_abt_start__ + __STACKSIZE_ABT__ , .), 4);
200   }
201   __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
202
203   . = ASSERT(__stack_abt_end__ >= __SRAM_segment_start__ && __stack_abt_end__ <= (__SRAM_segment_start__ + 0x00008000) , "error: .stack_abt is too large to fit in SRAM memory segment");
204
205   __stack_und_load_start__ = ALIGN(__stack_abt_end__ , 4);
206   .stack_und ALIGN(__stack_abt_end__ , 4) (NOLOAD) :
207   {
208     __stack_und_start__ = .;
209     *(.stack_und)
210     . = ALIGN(MAX(__stack_und_start__ + __STACKSIZE_UND__ , .), 4);
211   }
212   __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
213
214   __SRAM_segment_used_end__ = ALIGN(__stack_abt_end__ , 4) + SIZEOF(.stack_und);
215
216   . = ASSERT(__stack_und_end__ >= __SRAM_segment_start__ && __stack_und_end__ <= (__SRAM_segment_start__ + 0x00008000) , "error: .stack_und is too large to fit in SRAM memory segment");
217
218 }
219
Note: See TracBrowser for help on using the browser.