From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31253 invoked by alias); 15 Jul 2009 13:18:40 -0000 Received: (qmail 31243 invoked by uid 22791); 15 Jul 2009 13:18:39 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from wf-out-1314.google.com (HELO wf-out-1314.google.com) (209.85.200.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 15 Jul 2009 13:18:33 +0000 Received: by wf-out-1314.google.com with SMTP id 23so1285514wfg.24 for ; Wed, 15 Jul 2009 06:18:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.156.2 with SMTP id d2mr1767917wfe.299.1247663911009; Wed, 15 Jul 2009 06:18:31 -0700 (PDT) In-Reply-To: <20090715131830.GA7572@sg-ubuntu.local> References: <4A5DB80E.7090604@dallaway.org.uk> <20090715131830.GA7572@sg-ubuntu.local> Date: Wed, 15 Jul 2009 13:18:00 -0000 Message-ID: From: Mandeep Sandhu To: Sergei Gavrikov Cc: John Dallaway , ecos-discuss@ecos.sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Re: ecos mem footprint with HTTPD support X-SW-Source: 2009-07/txt/msg00136.txt.bz2 Wow Sergei! some telepathy you have...how'd you know I was about to post the error .bss error! :) seems like a std error? now back to reading your reply :) ..... On Wed, Jul 15, 2009 at 6:48 PM, Sergei Gavrikov wrote: > John Dallaway wrote: >> Hi Mandeep >> >> Mandeep Sandhu wrote: >> >> > Just as I got a rough estimate of how much mem (worst case) my hello w= orld >> > app along with the rest of the ecos libs take, is there any sample pro= g which I >> > can use to ascertain the runtime size of my app which uses the HTTPD p= kg? >> >> Note that the HTTPD package is intended for use with the eCos FreeBSD >> TCP/IP stack, not lwIP. >> >> The lwIP TCP/IP stack provides its own HTTP server test. Simply >> configure eCos for lwIP networking and then build eCos and the eCos >> tests for lwIP. Run "arm-eabi-size" (assuming an ARM target) on the >> resulting "httpd" test executable file. > > To know its sizes and to peace a linker I use a trick (workaround for > "section .bss is not within region ram" error). > > Let's call it "How much is The Fish". It is > > sed -i '/ram.*LENGTH/s,$,0,' isntall/lib/target.ld > > it just multiply target's ram size on 16 :-) > > I run this 1-line sed script before to build the tests. > > The below is just an example (I have no target) > > ecosconfig new sam7ex256 lwip_eth > ecosconfig tree > make > sed -i '/ram.*LENGTH/s,$,0,' isntall/lib/target.ld > make -C net/lwip_tcpip/current/ tests TESTS=3Dtests/httpd > > =A0 text =A0 =A0data =A0 =A0 bss =A0 =A0 dec =A0 =A0 hex filename > =A071240 =A0 =A05428 =A0102808 =A0179476 =A0 2bd14 httpd > > Ups... But, AFAIK, lwip's pbufs sucks RAM. Default number of pbufs is > 60, its default size is 1K. 60x1K... Well, let's reduce amount of the > buffers, i.e. import the below > > cdl_option CYGNUM_LWIP_PBUF_POOL_SIZE { > =A0 =A0user_value 6 > }; > > and rebuild the test > > =A0 text =A0 =A0data =A0 =A0 bss =A0 =A0 dec =A0 =A0 hex filename > =A071240 =A0 =A05428 =A0 46648 =A0123316 =A0 1e1b4 httpd > > It is something more interesting, but, I could break down the lwip > networking. I do not know. To reduce text segment you can disable udp, > raw ethernet support, etc., etc. (it's eCos). > > Hey, do not forget to revert ld script! It's easy if you use bash > history > > sed -i '/ram.*LENGTH/s,0$,,' isntall/lib/target.ld > > And now, without jokes. Look at Adam Dunkel's uIP TCP/IP stack > http://www.sics.se/~adam/uip/ > > and his invention, - Protothreads (Stackless Threads in C) > http://www.sics.se/~adam/pt/ > > I have a dream to try eCos together with Adam's Protothreads. If it will > allright, it will be possible to get unbeatable sizes for small memory > footprint targets. > > > Sergei > -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss