lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] FreeRTOS/lwIP Win32 simulator project now hosted


From: FreeRTOS Info
Subject: [lwip-users] FreeRTOS/lwIP Win32 simulator project now hosted
Date: Wed, 20 Jul 2011 15:39:00 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11

Hi list,

Following on from the threads that were posted a month or two back, I
have now created a FreeRTOS project, that runs in the FreeRTOS Win32
simulator (emulator?), using lwIP and WinPCap to implement a web server.

The web server is the http_raw version from the contrib download.  It
includes SSI functionality to show FreeRTOS task stats, and run time
stats (how much CPU time each task is using).

More notes can be found on the hosting page here:

http://interactive.freertos.org/entries/20290712-win32-project-with-lwip-web-server

and even more notes, including where to find configuration parameters
(IP address, etc.) are at the top of main.c.

The project uses the free Microsoft Visual Studio 2010 Express edition.

---------------------

My intention is to develop this project further, then host it with
documentation on the http://www.FreeRTOS.org site.

Naturally the project uses a multi threaded implementation.  I also
intend on adding in a sockets example, because this is the interface
most people are familiar with, even though it is the least efficient in
code and throughput.

Currently I'm mixing metaphors a bit by using multi threading, but also
using the raw httpd implementation.

I am also considering, for this example, changing the mechanism that
sends packets from the driver to the tcpip thread.  Currently, the
driver creates a message that includes the received data, and sends this
to the tcpip thread.  This however means that critical sections are
required in the driver to allocate the messages and the buffers.  For my
example I would prefer that the message sent to wake the tcpip thread is
statically allocated, and when unblocked, the tcpip thread then obtains
the packet from the network interface itself.  That avoids any issues
with running any code in an interrupt context, or having to allocate a
deferred interrupt as a task (with the overhead that that introduces).
It is also inline with how I have written drivers for other stack -
although is mixing metaphors even more as it is closer to how I image a
system that does not use multi tasking would work.

Eventually, when everything else is done, I would like to also replace
the static C structs with a 'standard' file system (reading off an SD
card or the like).

I would appreciate feedback on the following:

1) It was my intention to use FreeRTOS software timers to stimulate the
tcpip thread to process time outs (ARP timers,etc).  However, it seems
that lwIP V1.4.0 does not require any external help with timers, so
maybe forcing in FreeRTOS software timers is now overkill.

2) Part of the point of this exercise originally was to have a worked
example of using lwIP in a multi threaded environment, in addition to
the win32 contrib project which I used as a starting point.  I don't
think I am yet meeting that goal fully, as the http server uses the raw
API and is "just" a server.  I think adding in a sockets based client
application would be beneficial, then, to show a client using the stack,
full multithreading, and how to use the sockets interface.  Does anybody
have any suggestions on an example sockets based client application that
would be suitable for this purpose?  Is the sockets example in the
contrib directory suitable?

3) Likewise, a worked example that includes email, FTP, telnet, etc
along side the obligatory httpd would be very interesting and I think
useful for the community at large.

Regards,
Richard.

+ http://www.FreeRTOS.org
Designed for Microcontrollers.
More than 7000 downloads per month.






reply via email to

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