[ECOS] memory on linux synthetic target

Bart Veer bartv@redhat.com
Mon Feb 25 04:56:00 GMT 2002

>>>>> "Tom" == Tom Coremans <tom.coremans@acunia.com> writes:

    Tom> Hi,
    Tom> I`m woriking on the Linux synthetic target and wan`t to
    Tom> increase the size of the heap ecos uses.

    Tom> Is it enough that I change the size of the RAM in the
    Tom> mlt_synth_i386_rom.ldi file where I find:

    Tom> MEMORY
    Tom> {
    Tom>     rom : ORIGIN = 0x1000000, LENGTH = 0x800000
    Tom>     ram : ORIGIN = 0x2000000, LENGTH = 0x800000
    Tom> }

    Tom> and change the size in the mlt_synth_i386_rom.h file where I
    Tom> find:

    Tom> #define CYGMEM_REGION_ram (0x2000000)
    Tom> #define CYGMEM_REGION_ram_SIZE (0x800000)

    Tom> or is there anything else I should do to make this work?

I believe that changing the RAM size in both these files should be
sufficient. Ideally these sizes should be configuration options, but
when I last worked on this I did not have time to figure out exactly
how to make that work. Eight megabytes is rather more than is
available on a typical embedded target running eCos, so AFAIK the
current fixed size has not been a problem for anybody else so far.

The code which actually allocates space for all the RAM is in
synth_entry.c in hal/synth/arch:

    new_top = (void*) (CYGMEM_REGION_ram + CYGMEM_REGION_ram_SIZE);
    if (new_top != cyg_hal_sys_brk(new_top)) {
        CYG_FAIL("Failed to initialize memory");

So if there are problems, that would be a place to start looking.


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

More information about the Ecos-discuss mailing list