At91sam7x lwIP
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
At91sam7x lwIP
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.
At91sam7x lwIP
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.
At91sam7x lwIP
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
At91sam7x lwIP
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
At91sam7x lwIP
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.
At91sam7x lwIP
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,
At91sam7x lwIP
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.
At91sam7x lwIP
It uses
netconn_bind
netconn_listen
netconn_accept
At91sam7x lwIP
Ok I already recognsied this. is this custom api somewhere documented?
At91sam7x lwIP
http://www.sics.se/~adam/lwip/doc/lwip.pdf section 16.
At91sam7x lwIP
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 ;)