From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8304 invoked by alias); 10 May 2006 14:17:45 -0000 Received: (qmail 8294 invoked by uid 22791); 10 May 2006 14:17:44 -0000 X-Spam-Check-By: sourceware.org Received: from londo.lunn.ch (HELO londo.lunn.ch) (80.238.139.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 10 May 2006 14:17:35 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1FdpVI-0000ua-00; Wed, 10 May 2006 16:17:28 +0200 Date: Wed, 10 May 2006 14:17:00 -0000 To: Emmanuel Viollet Cc: ecos-discuss@ecos.sourceware.org Message-ID: <20060510141728.GE11815@lunn.ch> Mail-Followup-To: Emmanuel Viollet , ecos-discuss@ecos.sourceware.org References: <4461ADA1.5050103@webdyn.com> <20060510091234.GA11815@lunn.ch> <4461E29F.1030705@webdyn.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4461E29F.1030705@webdyn.com> User-Agent: Mutt/1.5.11+cvs20060403 From: Andrew Lunn X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Memory footprint X-SW-Source: 2006-05/txt/msg00078.txt.bz2 On Wed, May 10, 2006 at 02:54:55PM +0200, Emmanuel Viollet wrote: > Andrew Lunn a ?crit : > >On Wed, May 10, 2006 at 11:08:49AM +0200, Emmanuel Viollet wrote: > >>Hi. > >> > >>I can't find any information on this on the internet, so perhaps you can > >>help me out... > >> > >>I need to compile a kernel with PPP. Do you have any idea of the > >>footprint of eCOS with lwIP and PPP? > >>I compiled a minimal program with PPP for my Olimex LPC2106 evaluation > >>board, and it takes 560Kb. > >>Does this size seem normal? > > > >Is that the size of the elf or the size of the binary which is > >actually loaded onto the target? > > > >what does arm-elf-size say? > > $ arm-elf-size.exe a.out > text data bss dec hex filename > 41920 1512 8028 51460 c904 a.out > > I suppose that this means the binary will be 51460Kb in size? No. These are in units of bytes, not kilo bits. 51460Kb is about 6MBytes which makes no sense. The binary will be 41920 + 1512 bytes. You also need 8028bytes of statically allocated RAM. The size of the heap is not show here. > I am using a Phlips 2106 processor with 128Kb EEPROM and 64Kb RAM. > Do you think I can fit in LwIP + PPP + Zlib in this? zlib will be a problem. In its default configuration it will allocate 64Kbytes from the heap..... You can make is use less memory, but it will then no longer decompress data compressed with the default zlib configuration. So i don't recommend zlib. lwip + PPP does seems reasonable with 128Kb + 64Kb. > The linker is giving me errors : > $ arm-elf-gcc -I../../ecos_install/include hello.c > -L../../ecos_install/lib -Ttarget.ld -nostdlib > /usr/lib/gcc-lib/arm-elf/3.4.0/../../../../arm-elf/bin/ld: l'adresse > 0x2624c de a.out de la section .text n'est pas dans la r?gion rom > /usr/lib/gcc-lib/arm-elf/3.4.0/../../../../arm-elf/bin/ld: l'adresse > 0x2624c de a.out de la section .fini n'est pas dans la r?gion rom > /usr/lib/gcc-lib/arm-elf/3.4.0/../../../../arm-elf/bin/ld: l'adresse > 0x2aff1 de a.out de la section .rodata n'est pas dans la r?gion > rom > /usr/lib/gcc-lib/arm-elf/3.4.0/../../../../arm-elf/bin/ld: l'adresse > 0x2aff4 de a.out de la section .rodata1 n'est pas dans la r?gion rom > /usr/lib/gcc-lib/arm-elf/3.4.0/../../../../arm-elf/bin/ld: l'adresse > 0x2aff4 de a.out de la section .fixup n'est pas dans la r?gion rom > /usr/lib/gcc-lib/arm-elf/3.4.0/../../../../arm-elf/bin/ld: l'adresse > 0x2aff4 de a.out de la section .gcc_except_table n'est pas dans la > r?gion rom > /usr/lib/gcc-lib/arm-elf/3.4.0/../../../../arm-elf/bin/ld: l'adresse > 0x4001ca20 de a.out de la section .bss n'est pas dans la r?gion ram > > I'm sorry, but the error messages are in french. > From what I gather, the code is too big for RAM and ROM? This should fit, so it suggests a problem with your linker script. Is it trying to put everything in RAM? 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