4 # HEAPEND must be in the same memory region as DATA. STACK should be
5 # above HEAPEND, also in the same region, for configurations which
23 # Leave the rest of SDRAM for manual use.
31 # Leave the rest of SDRAM for manual use.
35 # We need to avoid the area used by RedBoot
38 # Put code for RedBoot apps in SRAM, since the fido1100 has
39 # trouble running code from SDRAM.
52 * Setup the memory map of the Innovasic SBC
53 * stack grows down from high memory.
55 * The memory map for the ROM model looks like this:
57 * +--------------------+ <-address 0 in Flash
59 * +--------------------+ <- low memory
62 * | ctor list | the ctor and dtor lists are for
63 * | dtor list | C++ support
64 * +--------------------+
65 * | DCACHE_CODE | code to be loaded into DCACHE
68 * +--------------------+
69 * | .data | initialized data goes here
70 * +--------------------+
74 * +--------------------+ <- The beginning of the SRAM area
75 * | .data | a wriable copy of data goes here.
77 * +--------------------+
79 * | __bss_start | start of bss, cleared by crt0
80 * | _end | start of heap, used by sbrk()
81 * | _heapend | End of heap, used by sbrk()
82 * +--------------------+
86 * | __stack | top of stack
87 * +--------------------+
90 * The memory map for the RAM model looks like this:
92 * +--------------------+ <- The beginning of the SRAM or SDRAM area.
94 * +--------------------+ <- low memory
97 * | ctor list | the ctor and dtor lists are for
98 * | dtor list | C++ support
99 * +--------------------+
100 * | DCACHE_CODE | code to be loaded into DCACHE
103 * +--------------------+
104 * | .data | initialized data goes here
106 * +--------------------+
108 * | __bss_start | start of bss, cleared by crt0
109 * | _end | start of heap, used by sbrk()
110 * | _heapend | End of heap, used by sbrk()
111 * +--------------------+
115 * | __stack | top of stack
116 * +--------------------+
119 STARTUP(fido-${CRT0}-crt0.o)
122 GROUP(-l${IO} -lfido -lc -lgcc)
126 rom (rx) : ORIGIN = 0x0000000, LENGTH = 0x800000
128 int_ram (rwx) : ORIGIN = 0x1000000, LENGTH = 0x6000
129 /* External SDRAM. */
130 sdram (rwx) : ORIGIN = 0x2000000, LENGTH = 0x800000
132 sram (rwx) : ORIGIN = ${SRAM_ORIGIN}, LENGTH = ${SRAM_LENGTH}
136 /* The interrupt vector is placed at the beginning of ${TEXT},
137 as required at reset. */
149 /* These are for running static constructors and destructors under ELF. */
150 KEEP (*crtbegin.o(.ctors))
151 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
152 KEEP (*(SORT(.ctors.*)))
153 KEEP (*crtend.o(.ctors))
154 KEEP (*crtbegin.o(.dtors))
155 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
156 KEEP (*(SORT(.dtors.*)))
157 KEEP (*crtend.o(.dtors))
160 KEEP (*crtbegin.o(.jcr))
161 KEEP (*(EXCLUDE_FILE (*crtend.o) .jcr))
162 KEEP (*crtend.o(.jcr))
171 LONG (0x4e560000) /* linkw %fp,#0 */
173 SHORT (0x4e5e) /* unlk %fp */
174 SHORT (0x4e75) /* rts */
177 LONG (0x4e560000) /* linkw %fp,#0 */
179 SHORT (0x4e5e) /* unlk %fp */
180 SHORT (0x4e75) /* rts */
181 . = ALIGN(0x800); /* align to a 2K dcache boundary */
191 /* Initialized data section. */
202 } > ${DATA} ${DATALOAD:+AT>} ${DATALOAD}
204 /* Zero-initialized data. */
217 /* Specially designated data is placed in the internal RAM. */
227 PROVIDE (__stack = ${STACK});
229 PROVIDE (_heapend = ${HEAPEND});