public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Discontinous RAM and linker scripts
@ 2004-06-15 13:46 Øyvind Harboe
  0 siblings, 0 replies; only message in thread
From: Øyvind Harboe @ 2004-06-15 13:46 UTC (permalink / raw)
  To: ecos-discuss

I'm trying to hook up an AT91MEC01 memory expansion card with EB40a, and
after a bit of fiddling around, it seems to work.

However, I don't think the AT91R40008 can map the external RAM at
0x40000(where the internal SRAM ends), and I can't seem to find a way to
convince the linker to take advantage of the extra ram once the .ram
segment fills up during linking. The ld manual seems to indicate that
shuffling around stuff to fit it into multiple MEMORY sections isn't in
ld's bag of tricks.

Here are my feeble beginnings of a linker script...

MEMORY
{
    ram  : ORIGIN = 0x00000000, LENGTH = 0x40000
    moreram  : ORIGIN = 0x40000000, LENGTH = 0x100000
    rom  : ORIGIN = 0x01000000, LENGTH = 0x100000
    
}

SECTIONS
{
    SECTIONS_BEGIN
    SECTION_rom_vectors (rom, 0x01000000, LMA_EQ_VMA)
    SECTION_text (rom, ALIGN (0x1), LMA_EQ_VMA)
    SECTION_fini (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_rodata (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_rodata1 (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fixup (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_gcc_except_table (rom, ALIGN (0x4), LMA_EQ_VMA)
    SECTION_fixed_vectors (ram, 0x20, LMA_EQ_VMA)
    SECTION_data (ram, 0x4000, FOLLOWING (.gcc_except_table))
    SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
    CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
    SECTIONS_END
}



-- 
Øyvind Harboe
http://www.zylin.com



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-06-15 13:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-15 13:46 [ECOS] Discontinous RAM and linker scripts Øyvind Harboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).