Forum: ARM programming with GCC/GNU tools lwIP + at91sam7x256 high mem usage

von Andi (Guest)

Rate this post
0 useful
not useful

I'm using currently the Olimex SAM7-EX256 board for a ethernet 
application. As base I'm using the lwIP_Demo_Rowley_ARM7 (lwIP-1.1.0 + 
FreeRTOS), all is working fine.
My problem is, that just the lwIP stack is consuming almost 40k of RAM 
(located in the .bss region, I've tried to link without lwIP). I've 
tried already to tune the memory options in lwipopts.h, but it doesn't 
change very much. The application is running out of the flash.
do you have any idea what could be the problem ?

Cheers, andy

Here my linker script:
        flash   : ORIGIN = 0x00100000, LENGTH = 256K
        ram             : ORIGIN = 0x00200000, LENGTH = 64K

_stack_end_ = 0x00200000 + 64K - 4;

        . = 0;
        startup : { *(.startup)} >flash

        prog :
        } >flash

        _end_of_text_ = .;

        .data :
                _data_beg_ = .;
                _data_beg_src_ = _end_of_text_;
                _data_end_ = .;
        } >ram AT>flash

        .bss :
                _bss_beg_ = .;
        } >ram

        /* Align here to ensure that the .bss section occupies space up 
        _end.  Align after .bss to ensure correct alignment even if the
        .bss section disappears because there are no input sections.  */
        . = ALIGN(32 / 8);
        . = ALIGN(32 / 8);
        _end = .;
        bss_end_ = . ; _bss_end_ = . ; _end_ = . ;
        PROVIDE (end = .);

von Clifford S. (clifford)

Rate this post
0 useful
not useful
The map file would be more useful than the linker script perhaps. That 
will indicate exactly where the memory is being used.


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.