At91sam7x lwIP

nobody wrote on Tuesday, November 21, 2006:

Hi,
I’m having a problem with freertos locking up while running lwIP.  I have modified the original source code (from the example) to simply send out data, then sleeps, and repeats, which it does correctly.  However, after several minutes of running, the data stream stops.    I tried putting replacing lwIP 1.1.0 with 1.1.1, with the result that now freertos locks up.  I’ve tried increasing the lwipTCP_STACK_SIZE in sys_arch.cwhich helped a little, but it just died a little later.  I was wondering if anyone else is having this problem? Also, I’m trying to figure out how to enable the lwIP debug, and then i can print it out over the USART interface.  Any help would be greatly appreciated.

I’m using:  AT91SAM7X-EK development board
Eclipse CDT as a development environment
GNU compiler
lwIP_Demo_Rowley_ARM7 as an example

Thanks
Andrew

neilbradley wrote on Tuesday, November 21, 2006:

Interesting you should mention this … I’m having a similar problem with an AT91SAM7-S256EK based board (same CPU, just more RAM and flash), though it just involves the UART. It’ll run from anywhere between 45 minutes and 2 hours before locking up cold. Haven’t yet instrumented it on my JTAG debugger.

nobody wrote on Wednesday, November 22, 2006:

Which GCC version are you using.  It was reported here a little while ago that the latest Code Sourcery version contains a bug that could be the cause.  I don’t know if this is the same in gnuarm versions.

To fix add the -fomit-frame-pointer option to your c flags.

Might not be related but I think you should add this option anyway.

nobody wrote on Thursday, November 23, 2006:

I had a similar problem.
I’m using Eclipse as IDE with gcc 4.1.0
The lwIP Demo always froze if I tried accessing the target over a Browser.
The compiler option -fomit-frame-pointer fixed it and now it works

nobody wrote on Thursday, November 30, 2006:

I think I have the locking-up figured out.  Now I’m trying to send lots of small packets over multiple connections.  As I increase the amount of connections and the amount of packets being send using the netconn_write command, the task slows down considerably.  I have tried increasing the size of MEM_SIZE in lwipopts.h, but now I’m out of room in RAM.  I was wondering if anyone knew how to increase the buffer size of lwIP.  My fear is that the buffer is too small to effectively send data quickly.  Also, is lwIP memory included in a FreeRTOS task’s memory?

Thanks
Andrew

nobody wrote on Thursday, November 30, 2006:

Looks to me from the map file that the buffers used by lwIP are allocated separately from the task memory.

There was a post on the lwIP mailing list about 10 days ago about how to optimise all the lwIP configuration settings.  It might be worth looking it up.

nobody wrote on Tuesday, December 05, 2006:

One thing that is advised is that lwIP 1.1.0 should be upgraded to lwIP 1.1.1. Therefore, will the lwIP_Rowley_demo in FreeRTOS be upgraded to lwIP 1.1.1 in future?

Regards,

saiberion wrote on Monday, December 18, 2006:

btw, which api is used it initialize the lwIP Setup in this example?
I can’t figure out if it’s the raw api or the bsd-like api.

nobody wrote on Monday, December 18, 2006:

It uses
netconn_bind
netconn_listen
netconn_accept

saiberion wrote on Monday, December 18, 2006:

Ok I already recognsied this. is this custom api somewhere documented?

nobody wrote on Tuesday, December 19, 2006:

http://www.sics.se/~adam/lwip/doc/lwip.pdf section 16.

saiberion wrote on Tuesday, December 19, 2006:

Thanks,
maybe a bit to old, I think that is depending on version 0.5
Well, as long nothing fundamental has changed it’s ok :wink: