[ECOS] Discontinous RAM and linker scripts
Øyvind Harboe
oyvind.harboe@zylin.com
Tue Jun 15 13:46:00 GMT 2004
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
More information about the Ecos-discuss
mailing list