This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Help required for LDI file


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]