cancel
Showing results for 
Search instead for 
Did you mean: 

uIP webserver w protothreads

erics
Associate II
Posted on January 23, 2007 at 17:27

uIP webserver w protothreads

1 REPLY 1
erics
Associate II
Posted on January 23, 2007 at 17:27

Hello, --First off sorry if this is a duplicate, I am having some issues tech issues.

I am wondering if anyone has used the uIP stack 1.0 with uVision 3 RVMDK for the STR7 MC?

http://www.sics.se/~adam/uip/

I am trying to do so now, and I can port in the stack just fine, but I run into problems trying to use the sample webserver. 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 (generate_part_of_file and send_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)

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 or suggests? Thanks!

Eric