X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=doc%2Fhtml%2Fuser-guide%2Fmodifying-the-memory-layout.html;fp=doc%2Fhtml%2Fuser-guide%2Fmodifying-the-memory-layout.html;h=0000000000000000000000000000000000000000;hb=739c21725ce2774a605a0f1de3edaac2c43aea0f;hp=6b4d4e763f30f4c99a994e04fff6dd42d734b90f;hpb=ae71e0fa8076a1b59600b3a0ea10155a2cb534ae;p=karo-tx-redboot.git diff --git a/doc/html/user-guide/modifying-the-memory-layout.html b/doc/html/user-guide/modifying-the-memory-layout.html deleted file mode 100644 index 6b4d4e76..00000000 --- a/doc/html/user-guide/modifying-the-memory-layout.html +++ /dev/null @@ -1,416 +0,0 @@ - - - - - - - - -Modifying the Memory Layout -
eCos User Guide
PrevChapter 28. Manual ConfigurationNext

Modifying the Memory Layout

Each eCos platform package is supplied with linker script -fragments which describe the location of memory regions on the evaluation -board and the location of memory sections within these regions. -The correct linker script fragment is selected and included in the -eCos linker script target.ld when -eCos is built.

It is not necessary to modify the default memory -layouts in order to start development with eCos. However, it will -be necessary to edit a linker script fragment when the memory map -of the evaluation board is changed. For example, if additional memory -is added, the linker must be notified that the new memory is available -for use. As a minimum, this would involve modifying the length of -the corresponding memory region. Where the available memory is non-contiguous, -it may be necessary to declare a new memory region and reassign -certain linker output sections to the new region.

Linker script fragments and memory layout header files should -be edited within the eCos install tree. They are -located at include/pkgconf/mlt_*.*. -Where multiple start-up types are in use, it will be necessary to -edit multiple linker script fragments and header files. The information -provided in the header file and the corresponding linker script -fragment must always match. A typical linker script fragment is -shown below:

Example 28-1. eCos linker script fragment

MEMORY
-{
- rom : ORIGIN = 0x40000000, LENGTH = 0x80000
- ram : ORIGIN = 0x48000000, LENGTH = 0x200000
-}
-
-SECTIONS
-{
- SECTIONS_BEGIN
- SECTION_rom_vectors (rom, 0x40000000, LMA_EQ_VMA)
- SECTION_text (rom, ALIGN (0x1), LMA_EQ_VMA)
- SECTION_fini (rom, ALIGN (0x1), LMA_EQ_VMA)
- SECTION_rodata (rom, ALIGN (0x1), LMA_EQ_VMA)
- SECTION_rodata1 (rom, ALIGN (0x1), LMA_EQ_VMA)
- SECTION_fixup (rom, ALIGN (0x1), LMA_EQ_VMA)
- SECTION_gcc_except_table (rom, ALIGN (0x1), LMA_EQ_VMA)
- SECTION_data (ram, 0x48000000, FOLLOWING (.gcc_except_table))
- SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
- SECTIONS_END
-}

The file consists of two blocks, the MEMORY block -contains lines describing the address (ORIGIN) -and the size (LENGTH) of each memory -region. The MEMORY block is followed -by the SECTIONS block which contains -lines describing each of the linker output sections. Each section -is represented by a macro call. The arguments of these macros are -ordered as follows:

  1. The memory region in which the section will finally - reside.

  2. The final address ( -VMA -) of the section. This is expressed using one of the following forms:

    n

    at the absolute address specified by the - unsigned integer n

    ALIGN (n)

    following the final location of the previous section - with alignment to the next n-byte - boundary

  3. The initial address (LMA) - of the section. This is expressed using one of the - following forms:

    LMA_EQ_VMA

    the LMA - equals the VMA (no relocation)

    AT (n)

    at the absolute address specified by the - unsigned integer n

    FOLLOWING (.name)

    following the initial location of section - name

In order to maintain compatibility with linker script - fragments and header files exported by the - eCos Configuration Tool, the use - of other expressions within these files is not - recommended.

Note that the names of the linker output sections will vary -between target architectures. A description of these sections can -be found in the specific GCC documentation for -your architecture.


PrevHomeNext
Editing the SourcesUpManaging the Package Repository
\ No newline at end of file