# At91sam7x lwIP

**URL:** <https://forums.freertos.org/t/at91sam7x-lwip/1634>\
**Category:** Kernel\
**Created:** [November 21, 2006, 9:30pm UTC](https://forums.freertos.org/t/at91sam7x-lwip/1634 "2006-11-21T21:30:50Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [November 21, 2006, 9:30pm UTC](https://forums.freertos.org/t/at91sam7x-lwip/1634/1 "2006-11-21T21:30:50Z")

</div>

**nobody** wrote on [Tuesday, November 21, 2006](https://sourceforge.net/p/freertos/discussion/382005/thread/4c92e212/#b4a8):

Hi,  
I’m having a problem with freertos locking up while running lwIP.&nbsp; I have modified the original source code (from the example) to simply send out data, then sleeps, and repeats, which it does correctly.&nbsp; However, after several minutes of running, the data stream stops.&nbsp;&nbsp;&nbsp; I tried putting replacing lwIP 1.1.0 with 1.1.1, with the result that now freertos locks up.&nbsp; I’ve tried increasing the lwipTCP\_STACK\_SIZE in sys\_arch.cwhich helped a little, but it just died a little later.&nbsp; 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.&nbsp; Any help would be greatly appreciated.

I’m using:&nbsp; AT91SAM7X-EK development board  
Eclipse CDT as a development environment  
GNU compiler  
lwIP\_Demo\_Rowley\_ARM7 as an example

Thanks  
Andrew

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [November 21, 2006, 9:33pm UTC](https://forums.freertos.org/t/at91sam7x-lwip/1634/2 "2006-11-21T21:33:50Z")

</div>

**[neilbradley](https://sourceforge.net/u/neilbradley/)** wrote on [Tuesday, November 21, 2006](https://sourceforge.net/p/freertos/discussion/382005/thread/4c92e212/#b4a8/442e):

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.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [November 22, 2006, 8:06am UTC](https://forums.freertos.org/t/at91sam7x-lwip/1634/3 "2006-11-22T08:06:10Z")

</div>

**nobody** wrote on [Wednesday, November 22, 2006](https://sourceforge.net/p/freertos/discussion/382005/thread/4c92e212/#b4a8/4a47):

Which GCC version are you using.&nbsp; It was reported here a little while ago that the latest Code Sourcery version contains a bug that could be the cause.&nbsp; 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.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [November 23, 2006, 9:21am UTC](https://forums.freertos.org/t/at91sam7x-lwip/1634/4 "2006-11-23T09:21:44Z")

</div>

**nobody** wrote on [Thursday, November 23, 2006](https://sourceforge.net/p/freertos/discussion/382005/thread/4c92e212/#b4a8/f6eb):

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

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [November 30, 2006, 7:25pm UTC](https://forums.freertos.org/t/at91sam7x-lwip/1634/5 "2006-11-30T19:25:27Z")

</div>

**nobody** wrote on [Thursday, November 30, 2006](https://sourceforge.net/p/freertos/discussion/382005/thread/4c92e212/#b4a8/b85c):

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

Thanks  
Andrew

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [November 30, 2006, 8:32pm UTC](https://forums.freertos.org/t/at91sam7x-lwip/1634/6 "2006-11-30T20:32:34Z")

</div>

**nobody** wrote on [Thursday, November 30, 2006](https://sourceforge.net/p/freertos/discussion/382005/thread/4c92e212/#b4a8/b85c/f8e4):

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.&nbsp; It might be worth looking it up.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [December 5, 2006, 3:44am UTC](https://forums.freertos.org/t/at91sam7x-lwip/1634/7 "2006-12-05T03:44:29Z")

</div>

**nobody** wrote on [Tuesday, December 05, 2006](https://sourceforge.net/p/freertos/discussion/382005/thread/4c92e212/#b4a8/66ac):

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,

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [December 18, 2006, 8:26am UTC](https://forums.freertos.org/t/at91sam7x-lwip/1634/8 "2006-12-18T08:26:41Z")

</div>

**[saiberion](https://sourceforge.net/u/saiberion/)** wrote on [Monday, December 18, 2006](https://sourceforge.net/p/freertos/discussion/382005/thread/4c92e212/#b4a8/66ac/1c60):

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.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [December 18, 2006, 9:01am UTC](https://forums.freertos.org/t/at91sam7x-lwip/1634/9 "2006-12-18T09:01:49Z")

</div>

**nobody** wrote on [Monday, December 18, 2006](https://sourceforge.net/p/freertos/discussion/382005/thread/4c92e212/#b4a8/66ac/1c60/f267):

It uses  
netconn\_bind  
netconn\_listen  
netconn\_accept

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [December 18, 2006, 11:07am UTC](https://forums.freertos.org/t/at91sam7x-lwip/1634/10 "2006-12-18T11:07:46Z")

</div>

**[saiberion](https://sourceforge.net/u/saiberion/)** wrote on [Monday, December 18, 2006](https://sourceforge.net/p/freertos/discussion/382005/thread/4c92e212/#b4a8/66ac/1c60/f267/64b8):

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

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [December 19, 2006, 2:31pm UTC](https://forums.freertos.org/t/at91sam7x-lwip/1634/11 "2006-12-19T14:31:49Z")

</div>

**nobody** wrote on [Tuesday, December 19, 2006](https://sourceforge.net/p/freertos/discussion/382005/thread/4c92e212/#b4a8/66ac/1c60/f267/64b8/9090):

[http://www.sics.se/~adam/lwip/doc/lwip.pdf](http://www.sics.se/~adam/lwip/doc/lwip.pdf) section 16.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [December 19, 2006, 3:10pm UTC](https://forums.freertos.org/t/at91sam7x-lwip/1634/12 "2006-12-19T15:10:12Z")

</div>

**[saiberion](https://sourceforge.net/u/saiberion/)** wrote on [Tuesday, December 19, 2006](https://sourceforge.net/p/freertos/discussion/382005/thread/4c92e212/#b4a8/66ac/1c60/f267/64b8/9090/544c):

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 😉
