5 using both, gnulib & ewl symbols
\r
6 _cfm - to keep vectors.c variables
\r
7 __init_hardware - must be used from bsp.a, not from librt.a
\r
9 EXTERN(_cfm __init_hardware)
\r
14 vectorrom (RX): ORIGIN = 0x00000000, LENGTH = 0x00000400
\r
15 cfmprotrom (R): ORIGIN = 0x00000400, LENGTH = 0x00000020
\r
16 rom (RX): ORIGIN = 0x00000420, LENGTH = 0x0007FBE0 /* Code + Const data */
\r
17 ram (RW): ORIGIN = 0x1FFF0000, LENGTH = 0x00020000 /* SRAM - RW data */
\r
19 /* kernel space starts after RAM variables (Location of MQX Kernel data + MQX heap) */
\r
20 end_of_kd (RW): ORIGIN = 0x2000FFF0, LENGTH = 0x00000000
\r
22 /* Boot stack reused by MQX Kernel data */
\r
23 bstack (RW): ORIGIN = 0x2000FA00, LENGTH = 0x00000200 /* Boot stack */
\r
24 end_bstack (RW): ORIGIN = 0x2000FC00, LENGTH = 0x00000000 /* Boot stack end address requires 4B alignment */
\r
30 __INTERNAL_SRAM_BASE = 0x1FFF0000;
\r
31 __INTERNAL_SRAM_SIZE = 0x00020000;
\r
33 __INTERNAL_FLASH_BASE = 0x00000000;
\r
34 __INTERNAL_FLASH_SIZE = 0x00080000;
\r
36 __INTERNAL_FLEXNVM_BASE = 0;
\r
37 __INTERNAL_FLEXNVM_SIZE = 0;
\r
39 __EXTERNAL_MRAM_BASE = 0x70000000;
\r
40 __EXTERNAL_MRAM_SIZE = 0x00080000;
\r
41 __EXTERNAL_MRAM_ROM_BASE = 0x70000000;
\r
42 __EXTERNAL_MRAM_ROM_SIZE = 0x00000000;
\r
43 __EXTERNAL_MRAM_RAM_BASE = 0x70000000;
\r
44 __EXTERNAL_MRAM_RAM_SIZE = 0x00080000;
\r
46 __EXTERNAL_LCD_BASE = 0x60000000;
\r
47 __EXTERNAL_LCD_SIZE = 0x1FFFF;
\r
48 __EXTERNAL_LCD_DC_BASE = 0x60010000;
\r
50 /* MQX link time configurations */
\r
51 __DEFAULT_PROCESSOR_NUMBER = 1;
\r
52 __DEFAULT_INTERRUPT_STACK_SIZE = 1024;
\r
53 __KERNEL_DATA_VERIFY_ENABLE = 0; /* Test SDRAM read/write */
\r
55 /* Flashx configurations */
\r
56 __FLASHX_SECT_SIZE = 0x800;
\r
61 __VECTOR_TABLE_ROM_START = __vector_table;
\r
62 KEEP(*(.vectors_rom))
\r
90 __exception_table_start__ = .;
\r
91 __exception_table_end__ = .;
\r
95 .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } > rom
\r
105 /* gcc uses crtbegin.o to find the start of
\r
106 the constructors, so we make sure it is
\r
107 first. Because this is a wildcard, it
\r
108 doesn't matter if the user does not
\r
109 actually link against crtbegin.o; the
\r
110 linker won't look for a file to match a
\r
111 wildcard. The wildcard also means that it
\r
112 doesn't matter which directory crtbegin.o
\r
114 KEEP (*crtbegin.o(.ctors))
\r
115 /* We don't want to include the .ctor section from
\r
116 from the crtend.o file until after the sorted ctors.
\r
117 The .ctor section from the crtend file contains the
\r
118 end of ctors marker and it must be last */
\r
119 KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
\r
120 KEEP (*(SORT(.ctors.*)))
\r
128 KEEP (*crtbegin.o(.dtors))
\r
129 KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
\r
130 KEEP (*(SORT(.dtors.*)))
\r
137 PROVIDE_HIDDEN (__preinit_array_start = .);
\r
138 KEEP (*(.preinit_array*))
\r
139 PROVIDE_HIDDEN (__preinit_array_end = .);
\r
144 PROVIDE_HIDDEN (__init_array_start = .);
\r
145 KEEP (*(SORT(.init_array.*)))
\r
146 KEEP (*(.init_array*))
\r
147 PROVIDE_HIDDEN (__init_array_end = .);
\r
152 PROVIDE_HIDDEN (__fini_array_start = .);
\r
153 KEEP (*(SORT(.fini_array.*)))
\r
154 KEEP (*(.fini_array*))
\r
155 PROVIDE_HIDDEN (__fini_array_end = .);
\r
158 /* create _etext symbol which keep
\r
159 relocation(execution) address of "code" end */
\r
169 /* create _sdata symbol which keep
\r
170 relocation(execution) address of data start */
\r
172 __VECTOR_TABLE_RAM_START = .;
\r
173 KEEP(*(.vectors_ram))
\r
183 __exception_table_start__ = .;
\r
184 __exception_table_end__ = .;
\r
195 __SDA_BASE_ = __SDA_BASE;
\r
198 /* create _edata symbol which keep
\r
199 relocation(execution) address of data end */
\r
212 __bss_start__ = __START_BSS;
\r
216 __bss_end__ = __END_BSS;
\r
220 /* move "location counter" to next relocated address */
\r
225 __KERNEL_DATA_START = ALIGN(0x10);
\r
227 .end_of_kernel_data :
\r
229 __KERNEL_DATA_END = .;
\r
230 __KERNEL_AREA_END = .;
\r
238 .end_of_boot_stack :
\r
241 _estack = _stack_addr;
\r
242 __SP_INIT = _stack_addr;
\r
243 __BOOT_STACK_ADDRESS = .;
\r
246 /* fill "__S_romp" table with memory region(s) to perform "rom to ram copy" */
\r
247 _romp_at = _etext + SIZEOF(.data);
\r
248 .romp : AT(_romp_at)
\r
250 __S_romp = _romp_at;
\r
251 LONG(_etext); /* source (rom) address */
\r
252 LONG(_sdata); /* target (ram) address */
\r
253 LONG(_edata - _sdata); /* size */
\r
254 /* null terminated */
\r
260 /* user flash area starts here */
\r
261 _flashx_start = _etext + SIZEOF(.data) + SIZEOF(.romp);
\r
263 _flashx_start = __INTERNAL_FLASH_BASE + __FLASHX_SECT_SIZE;
\r
264 /* flashx working area spans across the whole rest of Flash memory */
\r
265 __FLASHX_START_ADDR = ((_flashx_start + __FLASHX_SECT_SIZE - 1) / __FLASHX_SECT_SIZE) * __FLASHX_SECT_SIZE;
\r
266 __FLASHX_END_ADDR = __INTERNAL_FLASH_BASE + __INTERNAL_FLASH_SIZE;
\r