5 _cfm - to keep vectors.c variables
\r
6 __init_hardware - must be used from bsp.a, not from librt.a
\r
8 EXTERN(_cfm __init_hardware)
\r
13 vectorrom (RX): ORIGIN = 0x00000000, LENGTH = 0x00000400
\r
14 cfmprotrom (R): ORIGIN = 0x00000400, LENGTH = 0x00000020
\r
15 rom (RX): ORIGIN = 0x00000420, LENGTH = 0x000FFBE0 /* Code + Const data */
\r
16 ram (RW): ORIGIN = 0x1FFF0000, LENGTH = 0x00020000 /* SRAM - RW data */
\r
18 /* kernel space starts after RAM variables (Location of MQX Kernel data + MQX heap) */
\r
19 end_of_kd (RW): ORIGIN = 0x2000FFF0, LENGTH = 0x00000000
\r
21 /* Boot stack reused by MQX Kernel data */
\r
22 bstack (RW): ORIGIN = 0x2000FA00, LENGTH = 0x00000200 /* Boot stack */
\r
23 end_bstack (RW): ORIGIN = 0x2000FC00, LENGTH = 0x00000000
\r
29 __INTERNAL_SRAM_BASE = 0x1FFF0000;
\r
30 __INTERNAL_SRAM_SIZE = 0x00020000;
\r
31 /* This symbol is unused in SRAM target (runtime check ensure that SRAM pool = Kernel pool),
\r
32 it is defined here just to keep linker quiete */
\r
33 __SRAM_POOL = 0x2000FFF0;
\r
35 __INTERNAL_FLASH_BASE = 0x00000000;
\r
36 __INTERNAL_FLASH_SIZE = 0x00100000;
\r
38 __INTERNAL_FLEXNVM_BASE = 0;
\r
39 __INTERNAL_FLEXNVM_SIZE = 0;
\r
41 __UNCACHED_DATA_END = 0x2000FFF0;
\r
43 __EXTERNAL_MRAM_BASE = 0x60000000;
\r
44 __EXTERNAL_MRAM_SIZE = 0x00080000;
\r
45 __EXTERNAL_MRAM_ROM_BASE = 0x60000000;
\r
46 __EXTERNAL_MRAM_ROM_SIZE = 0x00000000;
\r
47 __EXTERNAL_MRAM_RAM_BASE = 0x60000000;
\r
48 __EXTERNAL_MRAM_RAM_SIZE = 0x00080000;
\r
50 __EXTERNAL_DDR2_RAM_BASE = 0x70000000;
\r
51 __EXTERNAL_DDR2_RAM_SIZE = 0x08000000;
\r
53 __EXTERNAL_LCD_BASE = 0x60000000;
\r
54 __EXTERNAL_LCD_SIZE = 0x1FFFF;
\r
55 __EXTERNAL_LCD_DC_BASE = 0x60010000;
\r
57 /* MQX link time configurations */
\r
58 __DEFAULT_PROCESSOR_NUMBER = 1;
\r
59 __DEFAULT_INTERRUPT_STACK_SIZE = 1024;
\r
60 __KERNEL_DATA_VERIFY_ENABLE = 0; /* Test SDRAM read/write */
\r
62 /* Flashx configurations */
\r
63 __FLASHX_SECT_SIZE = 0x1000;
\r
68 __VECTOR_TABLE_ROM_START = __vector_table;
\r
69 KEEP(*(.vectors_rom))
\r
97 __exception_table_start__ = .;
\r
98 __exception_table_end__ = .;
\r
102 .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } > rom
\r
112 /* gcc uses crtbegin.o to find the start of
\r
113 the constructors, so we make sure it is
\r
114 first. Because this is a wildcard, it
\r
115 doesn't matter if the user does not
\r
116 actually link against crtbegin.o; the
\r
117 linker won't look for a file to match a
\r
118 wildcard. The wildcard also means that it
\r
119 doesn't matter which directory crtbegin.o
\r
121 KEEP (*crtbegin.o(.ctors))
\r
122 /* We don't want to include the .ctor section from
\r
123 from the crtend.o file until after the sorted ctors.
\r
124 The .ctor section from the crtend file contains the
\r
125 end of ctors marker and it must be last */
\r
126 KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
\r
127 KEEP (*(SORT(.ctors.*)))
\r
135 KEEP (*crtbegin.o(.dtors))
\r
136 KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
\r
137 KEEP (*(SORT(.dtors.*)))
\r
144 PROVIDE_HIDDEN (__preinit_array_start = .);
\r
145 KEEP (*(.preinit_array*))
\r
146 PROVIDE_HIDDEN (__preinit_array_end = .);
\r
151 PROVIDE_HIDDEN (__init_array_start = .);
\r
152 KEEP (*(SORT(.init_array.*)))
\r
153 KEEP (*(.init_array*))
\r
154 PROVIDE_HIDDEN (__init_array_end = .);
\r
159 PROVIDE_HIDDEN (__fini_array_start = .);
\r
160 KEEP (*(SORT(.fini_array.*)))
\r
161 KEEP (*(.fini_array*))
\r
162 PROVIDE_HIDDEN (__fini_array_end = .);
\r
166 /* create _etext symbol which keep
\r
167 relocation(execution) address of "code" end */
\r
177 /* create _sdata symbol which keep
\r
178 relocation(execution) address of data start */
\r
180 __VECTOR_TABLE_RAM_START = .;
\r
181 KEEP(*(.vectors_ram))
\r
199 __SDA_BASE_ = __SDA_BASE;
\r
202 /* create _edata symbol which keep
\r
203 relocation(execution) address of data end */
\r
207 /* move "location counter" to next relocated address */
\r
219 __bss_start__ = __START_BSS;
\r
223 __bss_end__ = __END_BSS;
\r
226 __UNCACHED_DATA_START = .;
\r
229 /* move "location counter" to next relocated address */
\r
234 __KERNEL_DATA_START = ALIGN(0x10);
\r
236 .end_of_kernel_data :
\r
238 __KERNEL_DATA_END = .;
\r
239 __KERNEL_AREA_END = .;
\r
247 .end_of_boot_stack :
\r
250 _estack = _stack_addr;
\r
251 __SP_INIT = _stack_addr;
\r
252 __BOOT_STACK_ADDRESS = .;
\r
255 /* fill "__S_romp" table with memory region(s) to perform "rom to ram copy" */
\r
256 _romp_at = _etext + SIZEOF(.data);
\r
257 .romp : AT(_romp_at)
\r
259 __S_romp = _romp_at;
\r
260 LONG(_etext); /* source (rom) address */
\r
261 LONG(_sdata); /* target (ram) address */
\r
262 LONG(_edata - _sdata); /* size */
\r
263 /* null terminated */
\r
269 /* user flash area starts here */
\r
270 _flashx_start = _etext + SIZEOF(.data) + SIZEOF(.romp);
\r
272 _flashx_start = __INTERNAL_FLASH_BASE + __FLASHX_SECT_SIZE;
\r
273 /* flashx working area spans across the whole rest of Flash memory */
\r
274 __FLASHX_START_ADDR = ((_flashx_start + __FLASHX_SECT_SIZE - 1) / __FLASHX_SECT_SIZE) * __FLASHX_SECT_SIZE;
\r
275 __FLASHX_END_ADDR = __INTERNAL_FLASH_BASE + __INTERNAL_FLASH_SIZE;
\r