lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] LWIP on Cortex-M1


From: Simon Goldschmidt
Subject: Re: [lwip-devel] LWIP on Cortex-M1
Date: Fri, 24 Feb 2012 09:24:14 +0100

OK, here are some numbers from me. I have compiled the current master in two 
configurations:
1: ARP, UDP, ICMP and Timers (added SNTP from contrib as example UDP app)
2: added TCP and IP reassembly (added SMTP and tcpecho_raw from contrib as 
example TCP server and client apps)

Apps were included to ensure the linker sees functions used. I used slipif as 
netif but manually called etharp_output() and ethernet_input() to ensure all 
functions used by ethernetif wer referenced. lwipopts is attached (#define 
MY_MODE controls the two configurations). Numbers below are for M1 (M3 is ~5% 
bigger).

Using IAR Embedded Workbench for ARM 6.30, I get the following summary code 
sizes (without compiler libraries, which are ~1KB; including):

configuration 1: ~7 KB
configuration 2: ~21 KB

Given the first number (which is the configuration you, Christopher, will 
need), I don't see a pressing point for uIP. It's rather a question of 
philosophy (whether or not you want dynamically allocated memory).

Detailed module list (rw data is mostly uninitialized, its size ing mem.o and 
memp.o can greatly vary depending on your lwipopts.h settings):
configuration 1:
    Module            ro code  ro data  rw data
    ------            -------  -------  -------
W:\tmp\IAR_ARM\lwiptest\Release\Obj: [1]
    def.o                  52
    etharp.o            1 604               201
    icmp.o                374
    inet_chksum.o         332
    init.o                 24
    ip4.o                 626                22
    ip4_addr.o            310
    main.o                132                60
    mem.o                 484             2 076
    memp.o                124             2 592
    netif.o               186                12
    pbuf.o                810
    slipif.o              440
    sntp.o                356                 8
    timers.o              216                 8
    udp.o                 786        8        8
    -------------------------------------------
    Total:              6 856        8    4 987

configuration 2:
    Module            ro code  ro data  rw data
    ------            -------  -------  -------
W:\tmp\IAR_ARM\lwiptest\Release\Obj: [1]
    def.o                  52
    echo.o                508                 4
    etharp.o            1 604               201
    icmp.o                404
    inet_chksum.o         332
    init.o                 28
    ip4.o                 654                22
    ip4_addr.o            488        4       16
    ip_frag.o             912                 8
    main.o                188                60
    mem.o                 484             2 076
    memp.o                140             3 068
    netif.o               266                12
    pbuf.o              1 072                 1
    slipif.o              440
    smtp.o              2 508        2      342
    sntp.o                356                 8
    tcp.o               2 728       34       35
    tcp_in.o            3 904                44
    tcp_out.o           2 656
    timers.o              356                12
    udp.o                 786        8        8
    -------------------------------------------
    Total:             20 866       48    5 917


Hope that helps your, Christopher.


Simon



"Dittrich, Matthew" <address@hidden> wrote:
> For comparison sake, here are the numbers for uIP (with the TCP stuff
> hacked out, UDP only, I use this for TFTP support in boot loaders), same
> compiler, same M3, same -O0:
> 
>    text          data     bss     dec     hex filename
>    3444         15504       0   18948    4a04 ./bin/src/emac.o
>    1564             0       0    1564     61c ./bin/src/ether.o
>    3680            12      16    3708     e7c ./bin/uip/uip.o
>    1580             0     104    1684     694 ./bin/uip/uip_arp.o
>     120             0       0     120      78 ./bin/uip/uip_timer.o
>      16             0       0      16      10 ./bin/uip/arch/clock-arch.o
>     256             0       0     256     100 ./bin/uip/arch/tapdev.o
> 
> Totaling 10660 bytes of text, again with "drivers" included.  It totals
> 5630 bytes when using -Os.
> 
> MD
> 
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On Behalf Of Dittrich, Matthew
> Sent: Thursday, February 23, 2012 12:27 PM
> To: lwip-devel
> Subject: Re: [lwip-devel] LWIP on Cortex-M1
> 
> Here are some numbers from GCC 4.5.2 with no optimizations for my M3
> against some "post 1.4.0 git" build:
> 
>    text          data     bss     dec     hex filename
>    4096         15704       0   19800    4d58 ./bin/src/emac.o
>    1628            80       0    1708     6ac ./bin/src/ethernet.o
>     992             0       0     992     3e0 ./bin/lwip/arch/ethernetif.o
>      16             0       0      16      10 ./bin/lwip/arch/sys_arch.o
>    3492             0     164    3656     e48 ./bin/lwip/netif/etharp.o
>    1532             0       0    1532     5fc ./bin/lwip/core/ipv4/autoip.o
>    1012             0       0    1012     3f4 ./bin/lwip/core/ipv4/icmp.o
>    1188             0       0    1188     4a4 
> ./bin/lwip/core/ipv4/inet_chksum.o
>       0             0       0       0       0 ./bin/lwip/core/ipv4/inet.o
>    1264             0      16    1280     500 ./bin/lwip/core/ipv4/ip_addr.o
>    2668             0       8    2676     a74 ./bin/lwip/core/ipv4/ip_frag.o
>    2044             0       2    2046     7fe ./bin/lwip/core/ipv4/ip.o
>     144             0       0     144      90 ./bin/lwip/core/def.o
>    7124             4       0    7128    1bd8 ./bin/lwip/core/dhcp.o
>       0             0       0       0       0 ./bin/lwip/core/dns.o
>      32             0       0      32      20 ./bin/lwip/core/init.o
>    1668          7188      12    8868    22a4 ./bin/lwip/core/mem.o
>     788          7128      40    7956    1f14 ./bin/lwip/core/memp.o
>    1100             0       1    1101     44d ./bin/lwip/core/netif.o
>    3836             0       0    3836     efc ./bin/lwip/core/pbuf.o
>       0             0       0       0       0 ./bin/lwip/core/raw.o
>     528             0       0     528     210 ./bin/lwip/core/stats.o
>       0             0       0       0       0 ./bin/lwip/core/sys.o
>    8676             0      48    8724    2214 ./bin/lwip/core/tcp_in.o
>    5416             0       0    5416    1528 ./bin/lwip/core/tcp_out.o
>    5348            24       1    5373    14fd ./bin/lwip/core/tcp.o
>    1004             0      12    1016     3f8 ./bin/lwip/core/timers.o
>    2224             0       0    2224     8b0 ./bin/lwip/core/udp.o
>     716             0       0     716     2cc ./bin/lwip/netbios/netbios.o
>    1060             0      48    1108     454 ./bin/lwip/netbios/nbns.o
>       0             0       0       0       0 ./bin/lwip/netio/netio.o
>    2356             0      12    2368     940 ./bin/lwip/core/ipv4/igmp.o
> 
> Which totals 61952 bytes of text (which includes my drivers, but no other
> library code that gets pulled in).  When optimizing for size (-Os), the
> total is 31480. My project doesn't build when I switch it to M1, so I can't
> help with those numbers... but I'd consider this is a pretty "full featured"
> RAW API configuration.  If you don't need good TCP, uIP might be more
> appropriate?
> 
> MD
> 
> 
> 
> _______________________________________________
> lwip-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-devel
> 
> 
> 
> _______________________________________________
> lwip-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-devel

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

Attachment: lwipopts.h
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]