This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
problem with data-section
- From: "Per-Erik Johansson" <perka at dtek dot chalmers dot se>
- To: ecos-discuss at sourceware dot org
- Date: Thu, 15 Nov 2007 10:09:25 +0100 (CET)
- Subject: [ECOS] problem with data-section
Hi
Im trying to get redboot working on a MPC5554 board, Im having some
trouble with the "copy data from rom to ram" in vectors.S
In all the .ldi files I have looked at the data-section is put in ram(?)
but still FOLLOWING the .gcc_except_table that is put in rom
>SECTION_data (ram, ALIGN (0x10), FOLLOWING (.gcc_except_table))
I guess this is some nice feature that would enable the data section to be
put in ROM but still be maped as it should be in ram.
But right now my "__rom_data_start" is at the end of the things that that
gets flashed to rom, with only 0xFF's after.
So when vectors.s starts to copy what is supposed to be data it just fills
the ram with F's.
If I look at the map from the linker I get that the data-section is in
ram, and the "__rom_data_start" is in the .fixup-section
Any ideas what could be wrong?
(I post my ldi file at the bottom, hope thats ok.)
Best regards
Per-Erik
>my ldi-file
#include <cyg/infra/cyg_type.inc>
MEMORY
{
rom : ORIGIN = 0x00000000, LENGTH = 0x00100000 /* internal FLASH 1
Meg Max */
ram(WA) : ORIGIN = 0x3fff0000, LENGTH = 0x00010000 /* internal
RAM 64k */
dram(WA) : ORIGIN = 0x40000000, LENGTH = 0x00400000 /* development
RAM 4 meg */
}
SECTIONS
{
SECTIONS_BEGIN
. = 0x00000000;
CYG_LABEL_DEFN(__reserved_vectors) = 0x00000000;
SECTION_vectors (rom, 0x00000000, LMA_EQ_VMA)
SECTION_text (rom, ALIGN (0x4), LMA_EQ_VMA)
SECTION_fini (rom, ALIGN (0x8), LMA_EQ_VMA)
SECTION_rodata1 (rom, ALIGN (0x8), LMA_EQ_VMA)
SECTION_rodata (rom, ALIGN (0x4), LMA_EQ_VMA)
SECTION_fixup (rom, ALIGN (0x4), LMA_EQ_VMA)
SECTION_gcc_except_table (rom, ALIGN (0x1), LMA_EQ_VMA)
. = 0x3fff0000;
CYG_LABEL_DEFN(__reserved_vsr_table) = ALIGN (0x10);
. = CYG_LABEL_DEFN(__reserved_vsr_table) + 0x200;
CYG_LABEL_DEFN(__reserved_virtual_table) = ALIGN (0x10);
. = CYG_LABEL_DEFN(__reserved_virtual_table) + 0x100;
SECTION_data (ram, ALIGN (0x10), FOLLOWING
(.gcc_except_table))
SECTION_sbss (ram, ALIGN (0x4), LMA_EQ_VMA)
SECTION_bss (ram, ALIGN (0x10), LMA_EQ_VMA)
CYG_LABEL_DEFN(__heap1) = ALIGN(0x8);
SECTIONS_END
}
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss