1 <!-- Copyright (C) 2003 Red Hat, Inc. -->
2 <!-- This material may be distributed only subject to the terms -->
3 <!-- and conditions set forth in the Open Publication License, v1.0 -->
4 <!-- or later (the latest version is presently available at -->
5 <!-- http://www.opencontent.org/openpub/). -->
6 <!-- Distribution of the work or derivative of the work in any -->
7 <!-- standard (paper) book form is prohibited unless prior -->
8 <!-- permission is obtained from the copyright holder. -->
12 >Modifying the Memory Layout</TITLE
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="eCos User Guide"
20 HREF="ecos-user-guide.html"><LINK
22 TITLE="Manual Configuration"
23 HREF="manual-configuration.html"><LINK
25 TITLE="Editing the Sources"
26 HREF="editing-the-sources.html"><LINK
28 TITLE="Managing the Package Repository"
29 HREF="managing-package-repository.html"></HEAD
40 SUMMARY="Header navigation table"
57 HREF="editing-the-sources.html"
65 >Chapter 28. Manual Configuration</TD
71 HREF="managing-package-repository.html"
85 NAME="MODIFYING-THE-MEMORY-LAYOUT">Modifying the Memory Layout</H1
90 > platform package is supplied with linker script
91 fragments which describe the location of memory regions on the evaluation
92 board and the location of memory sections within these regions.
93 The correct linker script fragment is selected and included in the
106 >It is not necessary to modify the default memory
107 layouts in order to start development with <SPAN
111 be necessary to edit a linker script fragment when the memory map
112 of the evaluation board is changed. For example, if additional memory
113 is added, the linker must be notified that the new memory is available
114 for use. As a minimum, this would involve modifying the length of
115 the corresponding memory region. Where the available memory is non-contiguous,
116 it may be necessary to declare a new memory region and reassign
117 certain linker output sections to the new region.</P
119 >Linker script fragments and memory layout header files should
120 be edited within the <SPAN
123 > install tree. They are
126 >include/pkgconf/mlt_*.*</TT
128 Where multiple start-up types are in use, it will be necessary to
129 edit multiple linker script fragments and header files. The information
130 provided in the header file and the corresponding linker script
131 fragment must always match. A typical linker script fragment is
141 > linker script fragment</B
150 CLASS="PROGRAMLISTING"
153 rom : ORIGIN = 0x40000000, LENGTH = 0x80000
154 ram : ORIGIN = 0x48000000, LENGTH = 0x200000
160 SECTION_rom_vectors (rom, 0x40000000, LMA_EQ_VMA)
161 SECTION_text (rom, ALIGN (0x1), LMA_EQ_VMA)
162 SECTION_fini (rom, ALIGN (0x1), LMA_EQ_VMA)
163 SECTION_rodata (rom, ALIGN (0x1), LMA_EQ_VMA)
164 SECTION_rodata1 (rom, ALIGN (0x1), LMA_EQ_VMA)
165 SECTION_fixup (rom, ALIGN (0x1), LMA_EQ_VMA)
166 SECTION_gcc_except_table (rom, ALIGN (0x1), LMA_EQ_VMA)
167 SECTION_data (ram, 0x48000000, FOLLOWING (.gcc_except_table))
168 SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
176 >The file consists of two blocks, the <TT
180 contains lines describing the address (<TT
195 > block which contains
196 lines describing each of the linker output sections. Each section
197 is represented by a macro call. The arguments of these macros are
198 ordered as follows: </P
205 >The memory region in which the section will finally
215 ) of the section. This is expressed using one of the following forms:</P
231 >at the absolute address specified by the
232 unsigned integer <SPAN
250 >following the final location of the previous section
251 with alignment to the next <SPAN
265 >The initial address (<TT
269 of the section. This is expressed using one of the
299 >at the absolute address specified by the
300 unsigned integer <SPAN
318 >following the initial location of section
332 >In order to maintain compatibility with linker script
333 fragments and header files exported by the
339 >Configuration Tool</SPAN
341 of other expressions within these files is not
344 >Note that the names of the linker output sections will vary
345 between target architectures. A description of these sections can
346 be found in the specific <SPAN
350 your architecture.</P
357 SUMMARY="Footer navigation table"
368 HREF="editing-the-sources.html"
377 HREF="ecos-user-guide.html"
386 HREF="managing-package-repository.html"
396 >Editing the Sources</TD
402 HREF="manual-configuration.html"
410 >Managing the Package Repository</TD