public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] ecos + lwip
@ 2009-08-26 11:01 Mandeep Sandhu
  2009-08-26 11:16 ` Simon Kallweit
  0 siblings, 1 reply; 49+ messages in thread
From: Mandeep Sandhu @ 2009-08-26 11:01 UTC (permalink / raw)
  To: ecos-discuss

Hi all,

I'm writing my app which makes use of the lwIP stack to send/recv packets.

I'm using lwIP that comes along with ecos-3.0 (which I think is ver 1.1.1).

I started by looking at the "test" examples given with lwIP. I noticed
that ALL examples
create 2 threads. One which simply starts and calls the following
functions and exits:

lwip_init();
sys_thread_new(...)

The thread started as part of sys_thread_new does the main
functionality of the app.
From the source I saw that sys_thread_new() simply allocates resources necessary
for starting the lwIP stack and then schedules the user function for execution.

My question:

* Does the lwIP stack run within the context of the thread started by
sys_thread_new()?

* If my app has to start 2 threads, both creating separate sockets and
send/recv data over
  it, then should only one of them be created with a call to
sys_thread_new()? While the other
  one is started by our regular cyg_thread_create() and friends?

Sorry if this is a dumb question.

Thanks,
-mandeep

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 49+ messages in thread
* Re: [ECOS] ecos + lwip
@ 2009-08-27 14:20 agfa prayoga s
  0 siblings, 0 replies; 49+ messages in thread
From: agfa prayoga s @ 2009-08-27 14:20 UTC (permalink / raw)
  To: Simon Kallweit; +Cc: Sergei Gavrikov, Mandeep Sandhu, ecos-discuss

Hi Simon,

okay,,, maybe i will try your patch for lwIP 1.3.0 first,,,

thanks

--
Agfa

--- On Thu, 8/27/09, Simon Kallweit <simon.kallweit@intefo.ch> wrote:

From: Simon Kallweit <simon.kallweit@intefo.ch>
Subject: Re: [ECOS] ecos + lwip
To: "agfa prayoga s" <fillariabrancoftii@yahoo.com>
Cc: "Sergei Gavrikov" <sergei.gavrikov@gmail.com>, "Mandeep Sandhu" <mandeepsandhu.chd@gmail.com>, "ecos-discuss" <ecos-discuss@ecos.sourceware.org>
Date: Thursday, August 27, 2009, 7:16 AM

agfa prayoga s wrote:
> Hi all,,,
> 
> did lwIP 1.3.0 port that Simon's patched for eCos 3.0 has improvement in
> memory footprint?
> 
> i am trying to run httpd example under lwip package on AT91SAM7X-EK board
> filled with AT91SAM7X256. that microcontroller only have 256KB ROM and
> 64KB RAM.
> 
> i have compiled the example successfully only with PBUF value 10, disable DHCP,
> SLIP, PPP, raw socket support, IP forwarding.
> 
> using arm-eabi-size, httpd binary has size:
> .text : 82740
> .data: 5428
> .bss: 50792
> 
> notice that the sum of .data and .bss is almost 56KB, near 64KB.
> 
> if i increase the PBUF value over 10(default value is 60), compilation process will failed with error that
> is no longer room in .bss because the limitation in 64KB.
> 
> maybe this is out of topic, but i appreciate your assistance...

Well that's hard to say. You would need to ask that question on the lwip list. I don't know if there are major differences in memory consumption between lwip 1.1.0 and 1.3.1. One advantage of my port is that it can be run in a completely polled mode (I call it simple mode), so you can run all your network code in a single thread, instead of multiple threads (at least 3). The old port did not directly offer that option. This can spare you quite a bit of memory (stacks). Notice that when using the simple mode, you will have to use the raw APIs (see httpd_simple example) and cannot use the netconn and socket APIs. In my project, I use the polled mode for the exact same reason (memory) with good results.

Simon

-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss




      

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 49+ messages in thread
[parent not found: <144735.17263.qm@web65404.mail.ac4.yahoo.com>]
* [ECOS] ecos + lwip
@ 2009-07-30 13:10 Mandeep Sandhu
  2009-07-30 13:51 ` Sergei Gavrikov
  0 siblings, 1 reply; 49+ messages in thread
From: Mandeep Sandhu @ 2009-07-30 13:10 UTC (permalink / raw)
  To: ecos-discuss

I'm using ecos-3.0 for current work.

How do you check the version of lwip that ships alongwith this version
of ecos? I'm looking at the Changelog file for this info.

The Changelog shows the current version as 1.1.1 whereas the latest
stable version of lwip released is 1.3.0.

Are there any major issues with 1.1.1 ? (it's seems pretty dated)
Are people using this in production code?

Also, I plan to implement a limited DHCP server. Are "raw sockets" the only
option available? Has anybody used lwip's raw native API to do similar stuff?

Thanks for your time.

Regards,
-mandeep

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2009-09-03 10:46 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-26 11:01 [ECOS] ecos + lwip Mandeep Sandhu
2009-08-26 11:16 ` Simon Kallweit
2009-08-27 10:49   ` Mandeep Sandhu
2009-08-27 11:17     ` Simon Kallweit
2009-08-27 12:42       ` Mandeep Sandhu
2009-08-27 13:20         ` Mandeep Sandhu
2009-08-27 13:42           ` Simon Kallweit
2009-08-27 13:51             ` Mandeep Sandhu
2009-08-27 14:02               ` Mandeep Sandhu
2009-08-27 14:06                 ` Simon Kallweit
2009-08-27 14:47                   ` Sergei Gavrikov
2009-08-27 15:03                     ` Sergei Gavrikov
2009-09-01 12:04                   ` Mandeep Sandhu
2009-09-01 12:17                     ` Simon Kallweit
2009-09-01 12:32                       ` Mandeep Sandhu
2009-09-01 12:38                         ` Simon Kallweit
2009-09-01 12:49                           ` Mandeep Sandhu
2009-09-01 12:57                             ` Simon Kallweit
2009-09-01 13:25                               ` Mandeep Sandhu
2009-09-01 13:34                                 ` Simon Kallweit
2009-09-01 15:20                                   ` Mandeep Sandhu
2009-09-01 15:32                                     ` Simon Kallweit
2009-09-01 15:46                                       ` Mandeep Sandhu
2009-09-01 15:49                                         ` Simon Kallweit
2009-09-02  6:15                                           ` Mandeep Sandhu
2009-09-02 13:19                                             ` Mandeep Sandhu
2009-09-02 15:32                                               ` Simon Kallweit
2009-09-03  7:45                                                 ` Mandeep Sandhu
2009-09-03  8:36                                                   ` Simon Kallweit
2009-09-03  8:46                                                     ` Mandeep Sandhu
2009-09-03  8:48                                                       ` Simon Kallweit
2009-09-03  8:55                                                         ` Mandeep Sandhu
2009-09-03  9:04                                                           ` Simon Kallweit
2009-09-03 10:23                                                             ` Mandeep Sandhu
2009-09-03 10:46                                                               ` Sergei Gavrikov
2009-08-27 13:52             ` Sergei Gavrikov
2009-08-27 14:05               ` Simon Kallweit
2009-08-27 14:42             ` Bart Veer
2009-08-27 14:54               ` Sergei Gavrikov
2009-08-27 13:45           ` Sergei Gavrikov
2009-08-27 13:49             ` Mandeep Sandhu
2009-08-27 14:04             ` Simon Kallweit
  -- strict thread matches above, loose matches on Subject: below --
2009-08-27 14:20 agfa prayoga s
     [not found] <144735.17263.qm@web65404.mail.ac4.yahoo.com>
2009-08-27 14:11 ` Simon Kallweit
2009-07-30 13:10 Mandeep Sandhu
2009-07-30 13:51 ` Sergei Gavrikov
2009-07-31  5:44   ` Mandeep Sandhu
2009-07-31 18:56     ` Sergei Gavrikov
2009-08-02 17:24       ` Mandeep Sandhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).