Okay,
I now have a more concrete description of my problem, and was wondering
if anyone has experienced this or could provide me with some insight. I
am trying to import the uIP stack and webserver example. I first
successfuly ported the stack and was able to ping my device from the
network. I am now trying to get the sample webserver to run and it
appears that things are going wrong regarding Protothreads. When I have
the protothread code included and call a function that is residing in
the same file as functions that use protothreads my MCU will not execute
instructions, however, I get no compiler errors.
I began to debug this by selective commenting and I found the following:
I can get my MCU to call functions from httpd.c if
1) I comment out all of the functions in HTTPD.c except the first two (
PT_THREAD and generate_part_of_file) AND
2) Proceed to modify the PT_WAIT_UNTIL definition from pt.h:
#define PT_WAIT_UNTIL(pt, condition) \
do { \
LC_SET((pt)->lc); \
if(!(condition)) { \
return PT_WAITING; \
} \
} while(0)
#endif
by removing the conditional check on "condition" (in other words, if I
do not in any way check or modify the value of condition things are good)
To test this I inserted a dummy function that I call from my main
program. If I do not make the above changes and attempt to call this
function while it resides in either httpd.c my MCU will not execute any
code. This also seems to be true for httpd-cgi but is not true for any
other files.
I then updated my proto thread files from v1.2 to v1.4, same problem.
Does anyone have any ideas?
One other odd thing that I noticed is that the function send_file( ) is
called repetitively, but I can find no definition for this function.
Could someone explain this to me?
Again, I am very new to the uIP stack and proto threads, so I maybe just
overlooking something very trivial. My compiler is Keil uVision 3.04
RVMDK and my MCU is the STR710 from ST.
Thanks!! I would really appreciate any help or insight that anyone has
to offer.
-Eric
Till Harbaum (Lists) wrote:
Hi,
On Thursday 18 January 2007 21:26, Eric Severson wrote:
threads. I received many compiler warnings regarding incompatible
variable types (unsigned char being assigned to char), especially in the
psock.c file.
So I decided that perhaps it would be better to try to use a webserver
that doesn't rely on protosockets, at least to begin with. Is there an
Hmm, i doubt that anyone backported the old server. And that in fact wouldn't
make much sense as it is the old one. Why don't you try to fix the warnings in
the 1.0 psock file? Are these only warnings? Does the server run with these
warnings?
Perhaps Adam has some simple psock demo you can start with so you don't need
to use the webserver to check that psock is working.
Regards,
Till