This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
eCos linking question
- From: "Tom Deconinck" <t dot deconinck at gmail dot com>
- To: ecos-discuss at sourceware dot org
- Date: Wed, 20 Feb 2008 13:59:39 +0100
- Subject: [ECOS] eCos linking question
Hi,
I'm trying to update the linker scripts to have code running from an
external flash on a Atmel at91sam7se32.
I started with the linker script for the at91sam7s32 (doesn't have an
external bus), and I started change that LDI script.
My LDI file now looks like this:
#include <cyg/infra/cyg_type.inc>
#include <pkgconf/hal_arm_at91sam7.h>
#include CYGBLD_HAL_PLATFORM_H
MEMORY
{
sram : ORIGIN = 0x00200000, LENGTH = 0x02000
ram : ORIGIN = 0x20000000, LENGTH = CYGHWR_AT91_SAM7SE_RAM_SIZE
srom : ORIGIN = 0x00100000, LENGTH = 0x8000
rom : ORIGIN = 0x10000000, LENGTH = CYGHWR_AT91_SAM7SE_FLASH_SIZE
}
SECTIONS
{
SECTIONS_BEGIN
SECTION_rom_vectors (rom, CYGNUM_HAL_ARM_AT91_IMAGE_ADDRESS, 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 (sram, 0x00200040, LMA_EQ_VMA)
SECTION_data (ram, ALIGN (0x4), FOLLOWING (.gcc_except_table))
SECTION_bss (ram, ALIGN (0x4), 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