Hi!

I have some basic questions about the software design with the lwIP
stack.
Currently I'm using a port of FreeRTOS with lwIP. This port uses lwIP
with NO_SYS true and calling it in one single task in a infinite loop.

Every cycle ethernetif_handlepackets is called, and after that depending
on some timing things the tmr functions.

So, I do not think this is a good solution. My first idea is:

Two Tasks, on handling the incoming packets, blocked via queue. An ISR
handles incoming packets and write it to the queue.

The second tasks executes all tmr functions.

Because a preemptive scheduler is used, the lwip stack stuff has to be
protected via mutexes.

Two tasks for recieving/tmr processing is overhead. So how could I do
that in one task? I can either wait for a specified time (tmr stuff) OR
for an event (incoming packet) but not both (This is by design of
FreeRTOS I think). Suggestions?

Or is it in my case generally better to use the socket api, especially
regarding to RAM consumption? I did'nt spent any time on considering to
use it because rawapi.txt says it uses much more ram, and I do not have
unlimited amount (40kb total) of ram. I do not know how much more ram
the socket api needs, but maybe it is not much more or even less than
with my "two tasks and queue... " solution.

I hope this is not to basic for this list, but I'm no expert in realtime
kernels or embedded systems design, so I hope some of you experts can
spend some time helping a beginner ;)

Thanks.
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to