This is the mail archive of the ecos-discuss@sources.redhat.com 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 on .ldi & h file


On Wed, Jul 27, 2005 at 05:46:58PM +0100, Harish Kulkarni wrote:
> Hello Group,
> 
> We are porting eCos onto board with leon processor.
> 
> The board has multiple chunks of ram (SRAM, scrachpad
> ram etc) spread across 32-bit address space.
> 
> How do we represent the same in .ldi and in .h (in
> pkgconf dir)?
> 
> In most of the ports, we can see ONLY one "ram"
> section used.
> 
> Could any one please refer us to .ldi/.h memory layout
> were multiple chunks of ram are mapped while porting
> eCos.

I don't think the linker can automatically spread the image over
multiple memory sections. The user has to control this. 

See for example 
packages/hal/arm/gps4020/current/include/pkgconf/mlt_arm_gps4020_rom.ldi

This has both sram and ram, and rom. It puts the fixed vectors in
sram, the data and bss in ram and the rest in rom. 

You could do something similar with your setup. Or you could for
example put the heap in a different memory bank than the rest of the
code.

If you need finer control you then need to make individial
functions/variables with attributes to tell the linker where to put a
symbol. The flash code has examples that does this. 

        Andrew

-- 
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]