HTTP Server Not Compiling

08 May 2010

Right, so I've got my new mBed, hooked it up to a MagJac RJ45 but I can't seem to get anything to actually produce a HTTP server.

First I tried the .bin file at: http://mbed.org/projects/cookbook/wiki/EthernetTest and that didn't work.

Then I tried to import this: http://mbed.org/projects/cookbook/svn/EMAC/lwip/examples/HTTPServer from here: http://mbed.org/projects/cookbook/wiki/EMAC into the web compiler and it refuses to compile. Instead it generates these errors:

"Pointer to incomplete class type is not allowed (E393)" in file "/HTTPServer/lib/lwip/Core/lwIP/netif/etharp.c"
"Class "etharp_hdr" has no member "ethhdr" (E135)" in file "/HTTPServer/lib/lwip/Core/lwIP/netif/etharp.c"
"Class "tcp_pcb" has no member "snd_max" (E135)" in file "/HTTPServer/lib/lwip/Core/lwIP/core/tcp_out.c"
"Class "dhcp" has no member "p" (E135)" in file "/HTTPServer/lib/lwip/Core/lwIP/core/dhcp.c"
(I'd post a better log but it won't let me only copying down the message and not the lines)

I'd love to know what I'm doing wrong here.

Thanks

 

13 May 2010

Hi Robert,

I just tried that, and it doesnt compile for me either, for the same reasons.

Before looking into why, i tried deleting the lwip library from the project, and instead imported the precompiled version and it compiled just fine. I opened up TeraTerm, run the binary and the IP address aquired by mbed was printed over the USB serial. I opened up my browser and went to the URL http://<my IP>/rpc/led1/write+1 and sure enough LED one came on.

You can import the working version I published :

http://mbed.org/users/chris/programs/WorkingHTTPServer

Hope that helps.

Chris

 

 

 

21 May 2010

Unfortunately I'm still stuck, I've imported that program, compiled it, then put the .bin file in my mbed. I then reset it and had a look at the right COM port but nothing is getting printed over that. By sprinkling "led* = 1;" statements all over the code I've found that it gets stuck after:

    Base::add_rpc_class<Timer>();
    Base::add_rpc_class<SPI>();
    Base::add_rpc_class<BusOut>();
    Base::add_rpc_class<BusIn>(); 

Thanks very much for your help.