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: Remapping eCos Memory


Douglas Bush wrote:
> 
> I'm bringing up our final development board (EDB7211 based), and I'm
> trying to figure out how to use a different memory map for eCos.
> 
> In particular I don't really know a good technique for doing this in
> eCos, and the Configuration Tool (2.08) has no memory configuration
> capabilities.
> 
> Our target is based on the EDB7211 development board.  There's no SDRAM
> (and in its place, significantly less SRAM), half the Flash memory.
> 
> Our physical memory map looks as follows; (in bytes)
>      External SRAM : ORIGIN = 0x10000000, LENGTH = 0x100000
>      Flash :         ORIGIN = 0xe0000000, LENGTH = 0x400000
>      Internal SRAM : ORIGIN = 0x60000000, LENGTH = 0x9c00
> 
> Original mlt_arm_edb7211_rom.ldi;
>      ram :  ORIGIN = 0x00000000, LENGTH = 0xfd7000
>      sram : ORIGIN = 0x60000000, LENGTH = 0x9c00
>      rom :  ORIGIN = 0xe0000000, LENGTH = 0x800000
> 
> I'm assuming that the ldi file refers to the virtual memory maps?
> 
> In reading various posts I see some folks change the pkgconf\mlt*.h, or
> ldi, or mlt files.  While other folks seem to think that changing the
> virtual map is the way to go.  Which would be appropriate here?  Should
> I change both?

The .ldi and .h files are all you strictly need to edit. The .mlt files are
used by the v1 series config tool as you know. You have to pay attention to
the distinction between load address and virtual address in the memory map
as described in these files. However the *physical* map can be something
else entirely - we don't care about how the platform does its MMU mapping
when it comes to these files, as long as it ends up mapped with the virtual
addresses matching the files.
 
> I need to make this work with an ICE as well, so for me, life would be a
> lot easier if the virtual memory map matched the physical memory map.
> (So it was a little disconcerting to notice that the flash drivers were
> hard coded.  Is anything else?)

To avoid having to make virtual==physical, all you need to do is allow the
load address to be different from the virtual address presumably.
 
> Finally, how to I find out how much RAM allocated dynamically by eCos?

Depends on the configuration. In general eCos is designed to avoid using
dynamic allocation itself, but there are exceptions (e.g. JFFS2, zlib, some
elements of the net stack, etc.).

> How much is needed in addition to the MBufs for, say, the ping test?

The net stack, while using dynamic memory allocation, does it out of
dedicated pools. Like at its CDL to see the sizes.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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