[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: [lwip] Using lwIP with CS8900A on Atmel 89C51
From: |
Adam Dunkels |
Subject: |
[lwip-users] Re: [lwip] Using lwIP with CS8900A on Atmel 89C51 |
Date: |
Wed, 08 Jan 2003 22:24:07 -0000 |
Hi Bilal!
On Monday 04 February 2002 18.56, you wrote:
> Well in that case the real test is to do recompiles and try to get as much
> optimized code as possible. I would also try coding the application in
> assembly and then calling tcp/ip functions from there although I don't know
> how much benefit that would get me.
If your application is small enough to be coded in assembler, the code size
of your application will most likely be significantly smaller than the code
size of lwIP. TCP alone is around 10-20k large (depending on the CPU and
compilter), and writing a 20k assembler program is *a lot* of work. I
wouldn't think that rewriting the application in assembler would reduce the
total code size so much that it would be worthwhile. (But of course, I might
be wrong :-)
> What is the difference between the uIP code and the lwIP code? And then
> with respect to 8051?
uIP is really the minimal TCP/IP stack implementation, where code size and
RAM requirements have been reduced while sacrificing performance. uIP does
not handle more than one in-flight segment per TCP connection so throughput
is limited by the receiver's delayed ACK algorithm. Sending data between a
uIP host and a PC could show as bad results as 1 kb/sec. (Sending data from a
PC host to uIP is not as bad, though.) The uIP API can also be slightly hard
to comprehend for beginners.
lwIP is more powerful and have no such throughput limitations but is nearly
10 times as large in terms of code size. RAM requirements for lwIP is
probably around 10 times of that of uIP as well. This is the price that has
to be paid in order to get the throughput and a much nicer API.
I would say that uIP is a better choice for really small 8-bitters in which
20-30k cannot be spared for code. Such small CPUs are likely to have
applications that don't generate that much data, either. To get a feel of the
throughput uIP delivers, point your webbrowser to http://c64.cc65.org/. The
web server serving those pages is running uIP.
What is your intended application, and how much ROM/RAM can you spare?
/adam
--
Adam Dunkels <address@hidden>
http://www.sics.se/~adam
[This message was sent through the lwip discussion list.]
- [lwip-users] Re: [lwip] Using lwIP with CS8900A on Atmel 89C51, Andrea Olivotto, 2003/01/08
- [lwip-users] Re: [lwip] Using lwIP with CS8900A on Atmel 89C51, Bilal Muddassir, 2003/01/08
- [lwip-users] Re: [lwip] Using lwIP with CS8900A on Atmel 89C51, address@hidden, 2003/01/08
- [lwip-users] Re: [lwip] Using lwIP with CS8900A on Atmel 89C51, Wing Kent Kwan, 2003/01/08
- [lwip-users] Re: [lwip] Using lwIP with CS8900A on Atmel 89C51,
Adam Dunkels <=
- [lwip-users] Re: [lwip] Using lwIP with CS8900A on Atmel 89C51, Andrea Olivotto, 2003/01/08
- [lwip-users] RE: [lwip] Using lwIP with CS8900A on Atmel 89C51, DASILVA VINCENTE BIT, 2003/01/09
- [lwip-users] Re: [lwip] Using lwIP with CS8900A on Atmel 89C51, Adam Dunkels, 2003/01/09
- [lwip-users] Re: [lwip] Using lwIP with CS8900A on Atmel 89C51, Adam Dunkels, 2003/01/09