This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Help required for LDI file
- From: John Dallaway <john at dallaway dot org dot uk>
- To: Himanshu Patel <himanshup at aftek dot com>
- Cc: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Thu, 01 Oct 2009 22:14:38 +0100
- Subject: [ECOS] Re: Help required for LDI file
- References: <c09652430909210250i3fb94d22qa688838e4745254d@mail.gmail.com> <000001ca428c$6179b020$246d1060$@com>
Hi Himanshu
Himanshu Patel wrote:
> We are using LPC2458, which has scatter (non-continuous) SRAM memory. Now
> we want to assign bss section to this scatter memory. We tried to create
> sections as below but the same is giving linking error.
> SECTION_bss (sram, 0x40000540, LMA_EQ_VMA)
> SECTION_bss (sram3, 0x7FD00a00, LMA_EQ_VMA)
The above code will attempt to define two linker output sections both
named ".bss". The GNU linker cannot allocate memory for symbols across
multiple memory regions in this way.
In order to split code or data across multiple memory regions, you will
need to define new output section macros (similar to those in arm.ld)
which are then mapped to the various memory regions by extending your
.ldi file. You must then adjust these macros to share the various
compiler-generated objects across the multiple output sections.
In the case of .bss, this is complicated by use of the __bss_start and
__bss_end symbols within eCos code. For example, there is code to zero
the bss at startup which assumes that the bss is contiguous. You will
need to examine how these symbols are used and accommodate any
assumptions that have been made.
I hope this helps
John Dallaway
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss