Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

At91sam7x lwIP

Posted by Nobody/Anonymous on 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



RE: At91sam7x lwIP

Posted by Neil Bradley on 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.

RE: At91sam7x lwIP

Posted by Nobody/Anonymous on 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.

RE: At91sam7x lwIP

Posted by Nobody/Anonymous on 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

RE: At91sam7x lwIP

Posted by Nobody/Anonymous on 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

RE: At91sam7x lwIP

Posted by Nobody/Anonymous on 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.

RE: At91sam7x lwIP

Posted by Nobody/Anonymous on December 5, 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,

RE: At91sam7x lwIP

Posted by saiberion on 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.

RE: At91sam7x lwIP

Posted by Nobody/Anonymous on December 18, 2006
It uses
netconn_bind
netconn_listen
netconn_accept

RE: At91sam7x lwIP

Posted by saiberion on December 18, 2006
Ok I already recognsied this. is this custom api somewhere documented?

RE: At91sam7x lwIP

Posted by Nobody/Anonymous on December 19, 2006
http://www.sics.se/~adam/lwip/doc/lwip.pdf section 16.

RE: At91sam7x lwIP

Posted by saiberion on 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 ;)


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS