1 /*******************************************************************************
2 * (c) Copyright 2012-2013 Microsemi SoC Products Group. All rights reserved.
4 * SmartFusion2 Cortex-M3 linker script for creating a SoftConsole downloadable
5 * debug image executing in SmartFusion2 internal eNVM.
7 * SVN $Revision: 5269 $
8 * SVN $Date: 2013-03-21 20:53:38 +0000 (Thu, 21 Mar 2013) $
11 OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
19 /*******************************************************************************
20 * Start of board customization.
21 *******************************************************************************/
25 * WARNING: The words "SOFTCONSOLE", "FLASH", and "USE", the colon ":", and
26 * the name of the type of flash memory are all in a specific order.
27 * Please do not modify that comment line, in order to ensure
28 * debugging of your application will use the flash memory correctly.
31 /* SOFTCONSOLE FLASH USE: microsemi-smartfusion2-envm */
32 rom (rx) : ORIGIN = 0x60000000, LENGTH = 256k
34 /* SmartFusion2 internal eNVM mirrored to 0x00000000 */
35 romMirror (rx) : ORIGIN = 0x00000000, LENGTH = 256k
37 /* SmartFusion2 internal eSRAM */
38 ram (rwx) : ORIGIN = 0x20000000, LENGTH = 64k
41 RAM_START_ADDRESS = 0x20000000; /* Must be the same value MEMORY region ram ORIGIN above. */
42 RAM_SIZE = 64k; /* Must be the same value MEMORY region ram LENGTH above. */
43 MAIN_STACK_SIZE = 8k; /* Cortex main stack size. */
44 PROCESS_STACK_SIZE = 4k; /* Cortex process stack size (only available with OS extensions).*/
46 /*******************************************************************************
47 * End of board customization.
48 *******************************************************************************/
50 PROVIDE (__main_stack_start = RAM_START_ADDRESS + RAM_SIZE);
51 PROVIDE (__process_stack_start = __main_stack_start - MAIN_STACK_SIZE);
52 PROVIDE (_estack = __main_stack_start);
53 PROVIDE (__mirrored_nvm = 1); /* Indicate to startup code that NVM is mirrored to VMA address and no text copy is required. */
59 __vector_table_vma_base_address = .;
67 __text_load = LOADADDR(.text);
70 *(.text .text.* .gnu.linkonce.t.*)
73 *(.glue_7t) *(.glue_7) *(.vfp11_veneer)
76 /* These are for running static constructors and destructors under ELF. */
77 KEEP (*crtbegin.o(.ctors))
78 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
79 KEEP (*(SORT(.ctors.*)))
80 KEEP (*crtend.o(.ctors))
81 KEEP (*crtbegin.o(.dtors))
82 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
83 KEEP (*(SORT(.dtors.*)))
84 KEEP (*crtend.o(.dtors))
86 *(.rodata .rodata.* .gnu.linkonce.r.*)
88 *(.ARM.extab* .gnu.linkonce.armextab.*)
96 PROVIDE_HIDDEN (__preinit_array_start = .);
97 KEEP (*(.preinit_array))
98 PROVIDE_HIDDEN (__preinit_array_end = .);
99 PROVIDE_HIDDEN (__init_array_start = .);
100 KEEP (*(SORT(.init_array.*)))
101 KEEP (*(.init_array))
102 PROVIDE_HIDDEN (__init_array_end = .);
103 PROVIDE_HIDDEN (__fini_array_start = .);
104 KEEP (*(.fini_array))
105 KEEP (*(SORT(.fini_array.*)))
106 PROVIDE_HIDDEN (__fini_array_end = .);
109 /* .ARM.exidx is sorted, so has to go in its own output section. */
113 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
120 __data_load = LOADADDR(.data);
121 _sidata = LOADADDR (.data);
127 *(.data .data.* .gnu.linkonce.d.*)
137 *(.bss .bss.* .gnu.linkonce.b.*)
152 .stabstr 0 (NOLOAD) :
156 /* DWARF debug sections.
157 Symbols in the DWARF debugging sections are relative to the beginning
158 of the section so we begin them at 0. */
160 .debug 0 : { *(.debug) }
161 .line 0 : { *(.line) }
162 /* GNU DWARF 1 extensions */
163 .debug_srcinfo 0 : { *(.debug_srcinfo) }
164 .debug_sfnames 0 : { *(.debug_sfnames) }
165 /* DWARF 1.1 and DWARF 2 */
166 .debug_aranges 0 : { *(.debug_aranges) }
167 .debug_pubnames 0 : { *(.debug_pubnames) }
169 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
170 .debug_abbrev 0 : { *(.debug_abbrev) }
171 .debug_line 0 : { *(.debug_line) }
172 .debug_frame 0 : { *(.debug_frame) }
173 .debug_str 0 : { *(.debug_str) }
174 .debug_loc 0 : { *(.debug_loc) }
175 .debug_macinfo 0 : { *(.debug_macinfo) }
176 /* SGI/MIPS DWARF 2 extensions */
177 .debug_weaknames 0 : { *(.debug_weaknames) }
178 .debug_funcnames 0 : { *(.debug_funcnames) }
179 .debug_typenames 0 : { *(.debug_typenames) }
180 .debug_varnames 0 : { *(.debug_varnames) }
181 .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
182 .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
183 /DISCARD/ : { *(.note.GNU-stack) }