This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: --entry= (slightly off topic)
- To: "'Gary Thomas'" <gthomas at redhat dot com>
- Subject: RE: [ECOS] --entry= (slightly off topic)
- From: "Trenton D. Adams" <tadams at theone dot dnsalias dot com>
- Date: Fri, 21 Sep 2001 09:21:42 -0600
- Cc: "'Fabrice Gautier'" <Fabrice_Gautier at sdesigns dot com>, "'eCos Discussion'" <ecos-discuss at sourceware dot cygnus dot com>
>
> On Fri, 2001-09-21 at 08:14, Trenton D. Adams wrote:
> > I don't want an object in ELF format at the end. I use
> objcopy to copy
> > to binary format. This is going to be the boot code that's
> loaded into
> > the board for flashing it with RedBoot or something like that.
> >
> > In this case do I want a linker script? I'm not remapping
> any memory or
> > anything like that.
> >
>
> Look at the build rules for RedBoot - we do exactly this all the time.
> An image is created, destined for either RAM or ROM and then "munged"
> into the most appropriate format. Binary is the most common case as
> this is exactly what you want to go into the ROM [image].
>
I assume you're talking about the ROM ldi file? I should change the rom
origin to be 0x00000000 since that's what it is in boot strap mode
right?
#include <cyg/infra/cyg_type.inc>
MEMORY
{
ram : ORIGIN = 0, LENGTH = 0xfd7000
sram : ORIGIN = 0x60000000, LENGTH = 0x9c00
rom : ORIGIN = 0xe0000000, LENGTH = 0x800000
}
SECTIONS
{
SECTIONS_BEGIN
SECTION_rom_vectors (rom, 0xe0000000, LMA_EQ_VMA)
SECTION_text (rom, ALIGN (0x4), 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_mmu_tables (rom, ALIGN (0x4000), LMA_EQ_VMA)
SECTION_fixed_vectors (ram, 0x20, LMA_EQ_VMA)
SECTION_data (ram, 0x1000, FOLLOWING (.mmu_tables))
SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
CYG_LABEL_DEFN(__sram) = 0x60000000;
SECTIONS_END
}