This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Porting to Atmel AT91 - stub image is *very* big



Andreas,

> SECTIONS
> {
>     SECTIONS_BEGIN
>     SECTION_rom_vectors    (rom, 0x01400000, LMA_EQ_VMA)
>     SECTION_rodata         (rom, ALIGN (0x4), LMA_EQ_VMA)
>     SECTION_text           (rom, ALIGN (0x4), LMA_EQ_VMA)
>     SECTION_bss            (dram, 0x00400000, LMA_EQ_VMA)
>     SECTION_data           (dram, ALIGN (0x4), LMA_EQ_VMA)
>     SECTIONS_END
> }

You have a big hole between the bss LMA and the rom_vectors LMA. You could
try something like:

SECTIONS
{
    SECTIONS_BEGIN
    SECTION_rom_vectors    (rom, 0x01400000, LMA_EQ_VMA) 
    SECTION_rodata         (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_text           (rom, ALIGN (0x4), LMA_EQ_VMA) 
    SECTION_data           (dram, 0x00400000, FOLLOWING(.text))
    SECTION_bss            (dram, ALIGN (0x4), LMA_EQ_VMA)
    SECTIONS_END
}

Note that the bss section should always end the data segment since it
sometimes expand at runtime (maybe not in eCos but that's what the
brk() system call does in a UNIX-like OS).

Hope this works,

Robin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]