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: changing the memory on the linux synthetic target


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

    Tom> I tried to change the amount of memory available for ecos
    Tom> running on the linux synthetic target by changing the values
    Tom> of LENGTH in the file

    Tom> mlt_synth_i386_rom.ldi :

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

    Tom> and by changing the value of ram_SIZE in the file

    Tom> mlt_synth_i386_rom.h:

    Tom> #define CYGMEM_REGION_ram (0x2000000)
    Tom> #define CYGMEM_REGION_ram_SIZE (0x800000)
    Tom> #define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R |
    Tom> CYGMEM_REGION_ATTR_W)

    Tom> but I still have only 8Meg available for the malloc function.

    Tom> Does anybody know what else I should chamge to make this
    Tom> work??

I am not totally sure, but one possibility is another change to
mlt_synth_i386_rom.h:

-#define CYGMEM_SECTION_heap1_SIZE (0x2800000 - (size_t) CYG_LABEL_NAME (__heap1))
+#define CYGMEM_SECTION_heap1_SIZE (0x3000000 - (size_t) CYG_LABEL_NAME (__heap1))

Alternatively you could calculate the heap size from CYGMEM_REGION_ram
and CYGMEM_REGION_ram_SIZE, but that would hinder people who need
a region of memory that is not in the heap.

Bart

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